Remove the customer details from the order received page in WooCommerce

Remove the customer details from the order received page in WooCommerce on child sites.

Snippet Type

Execute on Child Sites

Snippet

add_filter( 'wc_get_template', 'hide_order_recieved_customer_details', 10 , 1 );
function hide_order_recieved_customer_details( $template_name ) {
    // Targeting thankyou page and the customer details
    if( is_wc_endpoint_url( 'order-received' ) && strpos($template_name, 'order-details-customer.php') !== false ) {
        return false;
    }
    return $template_name;
}

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.