MainWP Community

Remove the Shipping Address in My Account in WooCommerce

Remove the shipping address in My Account if using WooCommerce on your child site.

Snippet Type

Execute on Child Sites

Snippet

add_filter( 'woocommerce_my_account_get_addresses', 'filter_wc_my_account_get_addresses', 10, 2 ); 
function filter_wc_my_account_get_addresses( $adresses, $customer_id ) { 
    if( isset($adresses['shipping']) ) {
        unset($adresses['shipping']);
    }
    return $adresses; 
}
1 Like

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