Move Amazon Button on Woocommerce Checkout Page

爱⌒轻易说出口 提交于 2019-12-04 16:59:31

The following worked for me:

function move_amazon_pay() {
    remove_action( 'woocommerce_before_checkout_form', array( wc_apa(), 'checkout_message' ), 5 );
    add_action( 'woocommerce_after_checkout_form', array( wc_apa(), 'checkout_message' ), 5 );
}
add_action( 'woocommerce_checkout_init', 'move_amazon_pay', 11 );

woocommerce_checkout_init must be at priority 11, because the Amazon Pay plugin adds the action at priority 10.

Use wc_apa() instead of $this because wc_apa() returns an instance of the WC_Amazon_Payments_Advanced class, allowing you to access the checkout_message method.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!