mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-08-30 05:00:51 +08:00
🐛 Render preview when enabling the button
Before this, the “is enabled” checkbox was not observed; enabling it did not cause a preview button to render, and required changing any other form field that was linked to the button Also start to extract some logic to a new helper file.
This commit is contained in:
parent
6ee4a40e18
commit
c23129cb91
4 changed files with 78 additions and 22 deletions
|
@ -174,7 +174,7 @@ return array(
|
|||
'gateway' => 'dcc',
|
||||
'requirements' => array(),
|
||||
'custom_attributes' => array(
|
||||
'data-ppcp-display' => wp_json_encode(
|
||||
'data-ppcp-display' => wp_json_encode(
|
||||
array(
|
||||
$display_manager
|
||||
->rule()
|
||||
|
@ -191,6 +191,8 @@ return array(
|
|||
->to_array(),
|
||||
)
|
||||
),
|
||||
'data-ppcp-apm-name' => $apm_name,
|
||||
'data-ppcp-field-name' => 'is_enabled',
|
||||
),
|
||||
'classes' => array( 'ppcp-valign-label-middle', 'ppcp-align-label-center' ),
|
||||
),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue