mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-07 19:54:15 +08:00
Add eligibility notice.
This commit is contained in:
parent
ad018766a6
commit
dc77deea79
4 changed files with 102 additions and 9 deletions
|
@ -24,6 +24,8 @@ return array(
|
|||
return $fields;
|
||||
}
|
||||
|
||||
$is_available = $container->get( 'googlepay.available' );
|
||||
|
||||
$insert_after = function( array $array, string $key, array $new ): array {
|
||||
$keys = array_keys( $array );
|
||||
$index = array_search( $key, $keys, true );
|
||||
|
@ -66,6 +68,15 @@ return array(
|
|||
->action_visible( 'googlepay_button_language' )
|
||||
->action_visible( 'googlepay_button_shipping_enabled' )
|
||||
->to_array(),
|
||||
$display_manager
|
||||
->rule()
|
||||
->condition_is_true( $is_available )
|
||||
->action_enable( 'googlepay_button_enabled' )
|
||||
->action_enable( 'googlepay_button_type' )
|
||||
->action_enable( 'googlepay_button_color' )
|
||||
->action_enable( 'googlepay_button_language' )
|
||||
->action_enable( 'googlepay_button_shipping_enabled' )
|
||||
->to_array(),
|
||||
)
|
||||
),
|
||||
),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue