Add handler support for settings fields

Add settings SubElementsHandler
This commit is contained in:
Pedro Silva 2023-08-30 16:38:00 +01:00
parent d6f6d05431
commit dc9eb96d99
No known key found for this signature in database
GPG key ID: E2EE20C0669D24B3
4 changed files with 150 additions and 4 deletions

View 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' ),
);
}
}