Last active
February 12, 2024 10:34
-
-
Save codersaiful/57668602f08f017c4bbfd466cdfff1cb to your computer and use it in GitHub Desktop.
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
<?php | |
/** | |
* Disable Plus minus button for specific page | |
* such: cart page, checkout page, | |
* using filter hook: 'wqpmb_show_validation' | |
* | |
* There are few filter hook | |
* wqpmb_show_validation bool filter hook | |
* wqpmb_on_product_page bool filter hook | |
* wqpmb_on_cart_page bool filter hook | |
* wqpmb_on_mini_cart_page bool filter hook | |
* wqpmb_template_on_off bool filter hook | |
* | |
* wqpmb_template | |
* | |
* @author Saiful Islam <[email protected]> | |
* | |
* @return bool | |
*/ | |
function ca_custom_off_plus_minus_specific($validation, $datas){ | |
if( is_cart() ){ //you can use any other page condition. | |
return false; | |
} | |
return $validation; | |
} | |
add_filter('wqpmb_show_validation', 'ca_custom_off_plus_minus_specific', 10, 2); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment