mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Add filters for place order button mode and text replacement script
This commit is contained in:
parent
b2ba72c06c
commit
c71e312f18
7 changed files with 240 additions and 0 deletions
|
@ -1156,6 +1156,25 @@ return array(
|
|||
);
|
||||
},
|
||||
|
||||
'wcgateway.use-place-order-button' => function ( ContainerInterface $container ) : bool {
|
||||
/**
|
||||
* Whether to use the standard "Place order" button with redirect to PayPal instead of the PayPal smart buttons.
|
||||
*/
|
||||
return apply_filters(
|
||||
'woocommerce_paypal_payments_use_place_order_button',
|
||||
false
|
||||
);
|
||||
},
|
||||
'wcgateway.place-order-button-text' => function ( ContainerInterface $container ) : string {
|
||||
/**
|
||||
* The text for the standard "Place order" button, when the "Place order" button mode is enabled.
|
||||
*/
|
||||
return apply_filters(
|
||||
'woocommerce_paypal_payments_place_order_button_text',
|
||||
__( 'Pay with PayPal', 'woocommerce-paypal-payments' )
|
||||
);
|
||||
},
|
||||
|
||||
'wcgateway.helper.vaulting-scope' => static function ( ContainerInterface $container ): bool {
|
||||
try {
|
||||
$token = $container->get( 'api.bearer' )->bearer();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue