Created
June 15, 2015 16:02
-
-
Save woogist/297f382d8291920f8556 to your computer and use it in GitHub Desktop.
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
function my_amazon_payments_handler() { | |
global $wc_amazon_payments_advanced; | |
if ( class_exists( 'WC_Subscriptions_Cart' ) ) { | |
if ( WC_Subscriptions_Cart::cart_contains_subscription() || WC_Subscriptions_Cart::cart_contains_subscription_renewal() || ( is_checkout_pay_page() && WC_Subscriptions_Order::order_contains_subscription( $wp->query_vars['order-pay'] ) ) ) { | |
remove_action( 'woocommerce_before_cart', array( $wc_amazon_payments_advanced, 'checkout_message' ), 5 ); | |
remove_action( 'woocommerce_before_checkout_form', array( $wc_amazon_payments_advanced, 'checkout_message' ), 5 ); | |
remove_action( 'before_woocommerce_pay', array( $wc_amazon_payments_advanced, 'checkout_message' ), 5 ); | |
} | |
} | |
} | |
add_action( 'plugins_loaded', 'my_amazon_payments_handler' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment