Allow dcc pay-order button renderer hook filter

This commit is contained in:
Kirill Braslavsky 2021-07-26 10:31:11 +03:00
parent f81aa63f8b
commit 03b76d9177
No known key found for this signature in database
GPG key ID: 61737D0C41BF3E75

View file

@ -191,7 +191,7 @@ class SmartButton implements SmartButtonInterface {
);
add_action(
'woocommerce_pay_order_after_submit',
$this->pay_order_dcc_button_renderer_hook(),
array(
$this,
'dcc_renderer',
@ -984,6 +984,16 @@ class SmartButton implements SmartButtonInterface {
return (string) apply_filters('woocommerce_paypal_payments_checkout_dcc_renderer_hook', 'woocommerce_review_order_after_submit');
}
/**
* Return action name PayPal DCC button will be rendered at on pay-order page.
*
* @return string
*/
private function pay_order_dcc_button_renderer_hook(): string
{
return (string) apply_filters('woocommerce_paypal_payments-pay-order_dcc_renderer_hook', 'woocommerce_pay_order_after_submit');
}
/**
* Return action name PayPal will be rendered next to Proceed to checkout button (normally displayed in cart).
*