Created
October 2, 2020 11:55
-
-
Save yousufansa/c37bde6bb78c1bf4a647601a091d3d29 to your computer and use it in GitHub Desktop.
Cartzilla - Remove All Error Message Form Single Product Page
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if ( ! function_exists( 'cz_child_remove_woocommerce_error_notice' ) ) { | |
| function cz_child_remove_woocommerce_error_notice( $types ) { | |
| if ( is_product() && ( $key = array_search('error', $types) ) !== false) { | |
| unset( $types[$key] ); | |
| } | |
| return $types; | |
| } | |
| } | |
| add_filter( 'woocommerce_notice_types', 'cz_child_remove_woocommerce_error_notice', 10 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment