Created
July 26, 2023 19:26
-
-
Save clifgriffin/1701917c0908af3aefd61b2c71f8c642 to your computer and use it in GitHub Desktop.
Disable CheckoutWC express checkout buttons when autoship is active
This file contains 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 | |
add_action( 'cfw_checkout_customer_info_tab', function () { | |
if ( function_exists( 'autoship_cart_has_valid_autoship_items' ) && autoship_cart_has_valid_autoship_items() ) { | |
remove_action( 'cfw_checkout_customer_info_tab', 'cfw_payment_request_buttons', 10 ); | |
} | |
}, 0 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment