mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 17:51:41 +08:00
Allow dcc pay-order button renderer hook filter
This commit is contained in:
parent
f81aa63f8b
commit
03b76d9177
1 changed files with 11 additions and 1 deletions
|
@ -191,7 +191,7 @@ class SmartButton implements SmartButtonInterface {
|
||||||
);
|
);
|
||||||
|
|
||||||
add_action(
|
add_action(
|
||||||
'woocommerce_pay_order_after_submit',
|
$this->pay_order_dcc_button_renderer_hook(),
|
||||||
array(
|
array(
|
||||||
$this,
|
$this,
|
||||||
'dcc_renderer',
|
'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 (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).
|
* Return action name PayPal will be rendered next to Proceed to checkout button (normally displayed in cart).
|
||||||
*
|
*
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue