Code-Snippets-Functions/Execute a function on a child site/WooCommerce/remove-shipping-address-my-account.txt

7 lines
284 B
Text

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;
}