How can I hide all payment options until the minimum order is reached on the cart page? For some reason, some of them are still available. In our case, PayPal (see attachment). Strangely, PayPal payment is not available on the checkout page. Basically, B2BKing hides all payment methods correctly as selected in B2BKing -> Groups via the checkboxes, but on the cart page, it hides everything except the Paypal button container/option. That also makes the minimum order message disappear after only being shown for a second (see ticket #3190424).
If I disable PayPal Smart Button on the Cart page, all problems go away, but that also removes the option for all user roles, which is not ideal as we need B2C and Guest customers to have this payment option on the cart page as well as at the checkout page.
If it helps, we're using the official PayPal for WooCommerce plugin powered by PayPal and built by Angelleye (a certified PayPal developer and official PayPal partner).
This has happened in the past with the Wholesale Suite, and they gave me this code to use, but I can't manage to replicate it with B2BKing; the site keeps crashing:
add_action( 'wp_head' , function() {
global $wc_wholesale_prices_premium;
$user_wholesale_role = $wc_wholesale_prices_premium->wwpp_wholesale_roles->getUserWholesaleRole();
if( !empty( $user_wholesale_role ) ) {
//your hide paypal payment for wholesale
echo '<style type="text/css">.angelleye_ppcp-button-container{display:none;}</style>'; }
});
Please help when possible. Thank you
Julian @ thelovingnature.co.uk
