mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Add handler support for settings fields
Add settings SubElementsHandler
This commit is contained in:
parent
d6f6d05431
commit
dc9eb96d99
4 changed files with 150 additions and 4 deletions
46
modules/ppcp-googlepay/src/Assets/PropertiesDictionary.php
Normal file
46
modules/ppcp-googlepay/src/Assets/PropertiesDictionary.php
Normal file
|
@ -0,0 +1,46 @@
|
|||
<?php
|
||||
/**
|
||||
* Properties of the GooglePay module.
|
||||
*
|
||||
* @package WooCommerce\PayPalCommerce\Button\Assets
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace WooCommerce\PayPalCommerce\Googlepay\Assets;
|
||||
|
||||
/**
|
||||
* Class Button
|
||||
*/
|
||||
class PropertiesDictionary {
|
||||
|
||||
/**
|
||||
* Returns the possible list of button colors.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function button_colors(): array {
|
||||
return array(
|
||||
'white' => __( 'White', 'woocommerce-paypal-payments' ),
|
||||
'black' => __( 'Black', 'woocommerce-paypal-payments' ),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the possible list of button types.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function button_types(): array {
|
||||
return array(
|
||||
'book' => __( 'Book', 'woocommerce-paypal-payments' ),
|
||||
'buy' => __( 'Buy', 'woocommerce-paypal-payments' ),
|
||||
'checkout' => __( 'Checkout', 'woocommerce-paypal-payments' ),
|
||||
'donate' => __( 'Donate', 'woocommerce-paypal-payments' ),
|
||||
'order' => __( 'Order', 'woocommerce-paypal-payments' ),
|
||||
'pay' => __( 'Pay', 'woocommerce-paypal-payments' ),
|
||||
'plain' => __( 'Plain', 'woocommerce-paypal-payments' ),
|
||||
'subscribe' => __( 'Book', 'woocommerce-paypal-payments' ),
|
||||
);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue