| 1 |
<?php |
| 2 |
|
| 3 |
/** |
| 4 |
* Checkout Options. |
| 5 |
* |
| 6 |
* @package Merchant |
| 7 |
*/ |
| 8 |
|
| 9 |
if ( ! defined( 'ABSPATH' ) ) { |
| 10 |
exit; // Exit if accessed directly |
| 11 |
} |
| 12 |
|
| 13 |
$before_fields = array(); |
| 14 |
if ( defined( 'MERCHANT_PRO_VERSION' ) && merchant_is_checkout_block_layout() ) { |
| 15 |
$before_fields = array( |
| 16 |
'type' => 'warning', |
| 17 |
'content' => sprintf( |
| 18 |
/* Translators: 1. docs link */ |
| 19 |
__( 'Your checkout page is being rendered through the new WooCommerce checkout block. You must edit the checkout page to use the classic checkout shortcode instead. Check <a href="%1$s" target="_blank">this documentation</a> to learn more.', 'merchant' ), |
| 20 |
'https://docs.athemes.com/article/how-to-switch-cart-checkout-blocks-to-the-classic-shortcodes/' |
| 21 |
), |
| 22 |
); |
| 23 |
} |
| 24 |
|
| 25 |
// Settings |
| 26 |
|
| 27 |
return array( |
| 28 |
array( |
| 29 |
'title' => esc_html__( 'Settings', 'merchant' ), |
| 30 |
'module' => 'checkout', |
| 31 |
'fields' => array( |
| 32 |
|
| 33 |
$before_fields, |
| 34 |
|
| 35 |
array( |
| 36 |
'id' => 'layout', |
| 37 |
'type' => 'radio', |
| 38 |
'title' => esc_html__( 'Layout', 'merchant' ), |
| 39 |
'options' => array( |
| 40 |
'layout-shopify' => esc_html__( 'Shopify multi step', 'merchant' ), |
| 41 |
'layout-one-step' => esc_html__( 'One step', 'merchant' ), |
| 42 |
'layout-multi-step' => esc_html__( 'Multi step', 'merchant' ), |
| 43 |
), |
| 44 |
'default' => 'layout-shopify', |
| 45 |
), |
| 46 |
|
| 47 |
array( |
| 48 |
'id' => 'sticky_totals_box', |
| 49 |
'type' => 'switcher', |
| 50 |
'title' => esc_html__( 'Sticky Totals Box', 'merchant' ), |
| 51 |
'condition' => array( 'layout', 'any', 'layout-shopify|layout-one-step' ), |
| 52 |
), |
| 53 |
|
| 54 |
), |
| 55 |
), |
| 56 |
); |
| 57 |
|