• Resolved Rasetsukoku

    (@rasetsukoku)


    I have a function that acts as a vacation mode and removes add to cart and checkout buttons, but paypal checkout options still show. How do I disable it via PHP?

Viewing 1 replies (of 1 total)
  • Plugin Author Payment Plugins

    (@mrclayton)

    Hi @rasetsukoku

    You can use filter wc_ppcp_cart_payment_gateways .

    Example:

    add_filter('wc_ppcp_cart_payment_gateways', function($gateways){
        if(my_custom_vacation_mode_enabled()){
           $gateways = [];
        }
        return $gateways;
    });

    Kind Regards

Viewing 1 replies (of 1 total)
  • The topic ‘Disable Paypal checkout options programmatically’ is closed to new replies.