♻️ Consolidate preview-HTML in a new setting type

This commit is contained in:
Philipp Stracker 2024-06-27 18:00:37 +02:00
parent 4214821eb1
commit d2f0cb1c31
No known key found for this signature in database
8 changed files with 152 additions and 76 deletions

View file

@ -337,14 +337,13 @@ return array(
'requirements' => array(),
),
'applepay_button_preview' => array(
'type' => 'ppcp-text',
'text' => sprintf(
'
<div class="ppcp-preview ppcp-button-preview" data-ppcp-apm-preview="%1$s">
<h4>' . __( 'Button Styling Preview', 'woocommerce-paypal-payments' ) . '</h4>
<div id="ppcp%1$sButtonPreview" class="ppcp-button-preview-inner"></div>
</div>',
$apm_name
'type' => 'ppcp-preview',
'preview' => array(
'id' => 'ppcp' . $apm_name . 'ButtonPreview',
'type' => 'button',
'message' => __( 'Button Styling Preview', 'woocommerce-paypal-payments' ),
'apm' => $apm_name,
'single' => true,
),
'screens' => array(
State::STATE_ONBOARDED,