Ralf
Forum Replies Created
-
I am able to access it now, it got fixed after two days. The problem now is when I log in to the payment plans with the account that is running a free version of Mailpoet the Pricing plans and features offered are different and more expensive then when I log in with a new account.
Forum: Plugins
In reply to: [Product Filter by WBW] Horizontal Filterso there is no way for me to align them all beside each other even if I adjust their width?
Well, okay then. I certainly think your support was worthy of monetary compensation. I will reach out to you guys on the Gpay app once I am ready to deploy on that! thank you again.
Also would these functions work for the Gpay & Apple Pay plugin you have?
Thank you, I have left a review. Is there a way to make a donation?
Perfect thank you so much!
I can’t find the button to turn off just the “express checkout button ” that’s not getting effected by the PHP controlling the checkout category exclusions. I only see and enable button for the whole paypal gateway.
This is great! It’s working the main Paypal button disappears but the “express checkout” paypal button remains. In the settings it seems like there is no option to disable the “express checkout” button and the only button to customize is the one that shows up for express checkout. Maybe I am missing something?
Thank you for sharing this, the Cart PHP snippet is working but when I apply the Checkout snippet it results in a total crash of the site.
add_filter('woocommerce_available_payment_gateways', function($gateways){ $my_category_ids = [277, 270, 457, 458, 375, 374, 370, 377, 343, 388, 269, 323, 340, 365, 327, 342, 119, 441, 345, 344, 291, 292, 293, 360, 366, 288]; //This is a list of all your category ID's to exclude. foreach(WC()->cart->get_cart() as $key => $values){ $categories = $values['data']->get_category_ids(); if(array_intersect($my_category_ids, $values['data']->get_category_ids())){ unset($gateways['ppcp']); return $gateways; } } return $gateways; });
Anyway we can get the paypal option to not display on checkout & cart pages when the function is triggered? Currently the function is working on the product single pages but when you place the product in the cart the paypal button shows up regardless.
This is awesome, thank you for sharing the array. Everything seems to be working. Is there a way to turn off the paypal option in cart & checkout when someone combines excluded product with a paypal payable product?
Also would this PHP function work with your Stripe (Google Pay & Apple Pay) Application?
Thank you.
So I currently have this in manually disabling all the child categories I want disabled but I doesn’t seem to be working.
add_filter(‘wc_ppcp_is_product_section_disabled’, function($disabled, $product){
if(!is_object($product)){
$product = wc_get_product($product);
}$my_category_id = 277 ; //this will be your category id. $my_category_id = 270 ; $my_category_id = 457 ; $my_category_id = 458 ; $my_category_id = 375 ; $my_category_id = 374 ; $my_category_id = 370 ; $my_category_id = 377 ; $my_category_id = 343 ; $my_category_id = 388 ; $my_category_id = 269 ; $my_category_id = 323 ; $my_category_id = 340 ; $my_category_id = 365 ; $my_category_id = 327 ; $my_category_id = 342 ; $my_category_id = 119 ; $my_category_id = 441 ; $my_category_id = 345 ; $my_category_id = 344 ; $my_category_id = 291 ; $my_category_id = 292 ; $my_category_id = 293 ; if($product && in_array($my_category_id, $product->get_category_ids())){ $disabled = true; } return $disabled;
}, 10, 2);
okay perfect I am able to get it to work, the only minor issue is I have two levels of categories a Parent category and a child category. I am able to set the ID to the child category and it works but I was wondering if there is a code where I can just do something like if ID of parent category = X then disable all child categories. Something like this would be a a big help.
currently im stacking multiple categories like this
dd_filter(‘wc_ppcp_is_product_section_disabled’, function($disabled, $product){
if(!is_object($product)){
$product = wc_get_product($product);
}$my_category_id = 277 ; //this will be your category id. $my_category_id = 270 ; if($product && in_array($my_category_id, $product->get_category_ids())){ $disabled = true; } return $disabled;
}, 10, 2);
Also will this code also work on the Stripe version of your plugin for Google & apple pay?
Perfect thanks again! I should be all set.
am I putting this in “additional css tab?” what would the code look like if I for example wanted to exclude paypal buttons from category “optics”