Skip to content

Instantly share code, notes, and snippets.

@codersaiful
Last active February 12, 2024 10:34
Show Gist options
  • Save codersaiful/57668602f08f017c4bbfd466cdfff1cb to your computer and use it in GitHub Desktop.
Save codersaiful/57668602f08f017c4bbfd466cdfff1cb to your computer and use it in GitHub Desktop.
<?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