Skip to content

Instantly share code, notes, and snippets.

@growdev
Last active February 3, 2022 02:26
Show Gist options
  • Save growdev/43e441bba1ab3cc5a13beb9698dfcec0 to your computer and use it in GitHub Desktop.
Save growdev/43e441bba1ab3cc5a13beb9698dfcec0 to your computer and use it in GitHub Desktop.
Remove the add address button from the My Account page when using WooCommerce Multiple Shipping Addresses
<?php
add_action( 'init', 'wcmsa_remove_action', 10 );
function wcmsa_remove_action() {
remove_action( 'woocommerce_after_my_account', array( WC_Multiple_Shipping_Addresses()->account, 'add_address_button' ) );
}
@growdev
Copy link
Author

growdev commented May 20, 2021

@sfmedia

This snippet is intended for use with my WC Multiple Shipping Address plugin. That plugin isn't currently for sale, but will be for sale later this year.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment