• Resolved alifarahani13

    (@alifarahani13)


    Hey there,
    I created my custom message when customers save their billing address in the address tab with wc_add_notice function and using woocommerce_customer_save_address hook. So now, I want to remove the default message that is “Address changed successfully.” and I can’t. Please help me to do this.

    Thanks, WP Guys!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Add this to your active theme’s “functions.php” file (same file that you added the woocommerce_customer_save_address hook):

    add_filter('woocommerce_add_success', 'removeNotice_AddressChangedSuccessfully', 99, 1);
    
    function removeNotice_AddressChangedSuccessfully($notice_message) {
    	return ($notice_message === __( 'Address changed successfully.', 'woocommerce' )) ? null : $notice_message;
    }
    Thread Starter alifarahani13

    (@alifarahani13)

    Hey thanks, it works! ??

    You’re welcome.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘how to remove “address changed successfully” message’ is closed to new replies.