My Account: Disable Customer Address Update

Disables ability for customers to update the address for Scheduled Orders in My Account > Addresses.

Important: Always test customizations to your site on a staging environment before making changes to your live / production site.  If you are not experienced with testing changes on a staging site, here is a good article to review.

/**
* Disables The Update Address on all Scheduled Orders functionality in My Account > Addresses.
*
* @param bool $enabled True enabled else false.
* @param int $user_id The current users ID
*
* @return bool The filtered valye,
*/
function xx_disable_update_address_notice( $enabled, $user_id ){
  return false;
}
add_filter( 'autoship_display_customer_update_actions', 'xx_disable_update_address_notice', 10, 2 );

Still need help? Contact Us Contact Us