array(
'label' => __( 'Which Steps to show', 'wp-multi-step-checkout' ),
'input_form' => 'header',
'value' => '',
'section' => 'general',
),
'show_shipping_step' => array(
'label' => __( 'Show the Shipping step', 'wp-multi-step-checkout' ),
'input_form' => 'checkbox',
'value' => true,
'section' => 'general',
),
'show_login_step' => array(
'label' => __( 'Show the Login step', 'wp-multi-step-checkout' ),
'input_form' => 'text',
/* translators: 1: Woocommerce Accounts URL 2: Screenshot URL. */
'value' => sprintf( __( ' For removing the login step you need to uncheck the "Allow customers to log into an existing account during checkout" option on the WP Admin -> WooCommerce -> Settings -> Accounts page. See this screenshot.', 'wp-multi-step-checkout' ), esc_url( $account_url ), esc_url( $no_login_screenshot ) ),
'section' => 'general',
),
'unite_billing_shipping' => array(
'label' => __( 'Show the Billing and the Shipping steps together', 'wp-multi-step-checkout' ),
'input_form' => 'checkbox',
'value' => false,
'section' => 'general',
),
'unite_order_payment' => array(
'label' => __( 'Show the Order and the Payment steps together', 'wp-multi-step-checkout' ),
'input_form' => 'checkbox',
'value' => false,
'section' => 'general',
),
'label2' => array(
'label' => __( 'Additional Elements', 'wp-multi-step-checkout' ),
'input_form' => 'header',
'value' => '',
'section' => 'general',
),
'show_back_to_cart_button' => array(
'label' => __( 'Show the Back to Cart button', 'wp-multi-step-checkout' ),
'input_form' => 'checkbox',
'value' => true,
'section' => 'general',
),
'registration_with_login' => array(
'label' => __( 'Show registration form in the Login step', 'wp-multi-step-checkout' ),
'input_form' => 'checkbox',
'value' => true,
'section' => 'general',
'description' => __( 'The registration form will be shown next to the login form, it will not replace it', 'wp-multi-step-checkout' ),
'pro' => true,
),
'registration_desc' => array(
'label' => '',
'input_form' => 'text',
/* translators: 1: Woocommerce Accounts URL 2: Screenshot URL. */
'value' => sprintf( __( 'Use the "Account creation" options on the WP Admin -> WooCommerce -> Settings -> Accounts & Privacy page to modify the Registration form. See this screenshot.', 'wp-multi-step-checkout' ), esc_url( $account_url ), esc_url( $registration_settings_screenshot ) ),
'section' => 'general',
'pro' => true,
),
'review_thumbnails' => array(
'label' => __( 'Add product thumbnails to the Order Review section', 'wp-multi-step-checkout' ),
'input_form' => 'checkbox',
'value' => true,
'section' => 'general',
'pro' => true,
),
'review_address' => array(
'label' => __( 'Add Address Review to the Order section', 'wp-multi-step-checkout' ),
'input_form' => 'checkbox',
'value' => false,
'section' => 'general',
'pro' => true,
),
'label3' => array(
'label' => __( 'Functionality', 'wp-multi-step-checkout' ),
'input_form' => 'header',
'value' => '',
'section' => 'general',
),
'validation_per_step' => array(
'label' => __( 'Validate the fields during each step', 'wp-multi-step-checkout' ),
'description' => __( 'The default WooCommerce validation is done when clicking the Place Order button. With this option the validation is performed when trying to move to the next step', 'wp-multi-step-checkout' ),
'input_form' => 'checkbox',
'value' => true,
'section' => 'general',
'pro' => true,
),
'clickable_steps' => array(
'label' => __( 'Clickable Steps', 'wp-multi-step-checkout' ),
'description' => __( 'The user can click on the steps in order to get to the next one.', 'wp-multi-step-checkout' ),
'input_form' => 'checkbox',
'value' => true,
'section' => 'general',
'pro' => true,
),
'keyboard_nav' => array(
'label' => __( 'Enable the keyboard navigation', 'wp-multi-step-checkout' ),
'description' => __( 'Use the keyboard\'s left and right keys to move between the checkout steps', 'wp-multi-step-checkout' ),
'input_form' => 'checkbox',
'value' => false,
'section' => 'general',
),
'url_hash' => array(
'label' => __( 'Change the URL for each step', 'wp-multi-step-checkout' ),
'description' => __( 'Each step will have a hash added to the URL. For example "#login" or "#billing". This option, together with some "History Change Trigger" settings in the Google Tag Manager, allows Google Analytics to track each step as different pages.', 'wp-multi-step-checkout' ),
'input_form' => 'checkbox',
'value' => false,
'section' => 'general',
'pro' => true,
),
/* Templates */
'main_color' => array(
'label' => __( 'Main Color', 'wp-multi-step-checkout' ),
'input_form' => 'input_color',
'value' => '#1e85be',
'section' => 'design',
),
'template' => array(
'label' => __( 'Template', 'wp-multi-step-checkout' ),
'input_form' => 'radio',
'value' => 'default',
'values' => array(
'default' => __( 'Default', 'wp-multi-step-checkout' ),
'md' => __( 'Material Design', 'wp-multi-step-checkout' ),
'breadcrumb' => __( 'Breadcrumbs', 'wp-multi-step-checkout' ),
),
'section' => 'design',
'pro' => true,
),
'wpmc_buttons' => array(
'label' => __( 'Use the plugin\'s buttons', 'wp-multi-step-checkout' ),
'input_form' => 'checkbox',
'value' => false,
'description' => __( 'By default the plugin tries to use the theme\'s design for the buttons. If this fails, enable this option in order to use the plugin\'s button style', 'wp-multi-step-checkout' ),
'section' => 'design',
'pro' => true,
),
'wpmc_check_sign' => array(
'label' => __( 'Show a "check" sign for visited steps', 'wp-multi-step-checkout' ),
'input_form' => 'checkbox',
'value' => false,
'section' => 'design',
'pro' => true,
),
'visited_color' => array(
'label' => __( 'Visited steps color', 'wp-multi-step-checkout' ),
'input_form' => 'input_color',
'value' => '#1EBE3A',
'section' => 'design',
'pro' => true,
),
/* Step Titles */
't_login' => array(
'label' => __( 'Login', 'wp-multi-step-checkout' ),
'input_form' => 'input_text',
'value' => __( 'Login', 'wp-multi-step-checkout' ),
'section' => 'titles',
),
't_billing' => array(
'label' => __( 'Billing', 'wp-multi-step-checkout' ),
'input_form' => 'input_text',
'value' => __( 'Billing', 'wp-multi-step-checkout' ),
'section' => 'titles',
),
't_shipping' => array(
'label' => __( 'Shipping', 'wp-multi-step-checkout' ),
'input_form' => 'input_text',
'value' => __( 'Shipping', 'wp-multi-step-checkout' ),
'section' => 'titles',
),
't_order' => array(
'label' => __( 'Order', 'wp-multi-step-checkout' ),
'input_form' => 'input_text',
'value' => __( 'Order', 'wp-multi-step-checkout' ),
'section' => 'titles',
),
't_payment' => array(
'label' => __( 'Payment', 'wp-multi-step-checkout' ),
'input_form' => 'input_text',
'value' => __( 'Payment', 'wp-multi-step-checkout' ),
'section' => 'titles',
),
't_back_to_cart' => array(
'label' => __( 'Back to cart', 'wp-multi-step-checkout' ),
'input_form' => 'input_text',
'value' => _x( 'Back to cart', 'Frontend: button label', 'wp-multi-step-checkout' ),
'section' => 'titles',
),
't_skip_login' => array(
'label' => __( 'Skip Login', 'wp-multi-step-checkout' ),
'input_form' => 'input_text',
'value' => _x( 'Skip Login', 'Frontend: button label', 'wp-multi-step-checkout' ),
'section' => 'titles',
),
't_previous' => array(
'label' => __( 'Previous', 'wp-multi-step-checkout' ),
'input_form' => 'input_text',
'value' => _x( 'Previous', 'Frontend: button label', 'wp-multi-step-checkout' ),
'section' => 'titles',
),
't_next' => array(
'label' => __( 'Next', 'wp-multi-step-checkout' ),
'input_form' => 'input_text',
'value' => _x( 'Next', 'Frontend: button label', 'wp-multi-step-checkout' ),
'section' => 'titles',
),
't_error' => array(
'label' => __( 'Please fix the errors on this step before moving to the next step', 'wp-multi-step-checkout' ),
'input_form' => 'input_text',
'value' => _x( 'Please fix the errors on this step before moving to the next step', 'Frontend: error message', 'wp-multi-step-checkout' ),
'section' => 'titles',
'description' => __( 'This is an error message shown in the frontend', 'wp-multi-step-checkout' ),
'pro' => true,
),
'c_sign' => array(
'label' => __( 'AND sign', 'wp-multi-step-checkout' ),
'input_form' => 'input_text',
'value' => __( '&', 'wp-multi-step-checkout' ),
'section' => 'titles',
'description' => __( 'The sign between two unified steps. For example "Billing & Shipping"' ),
),
't_wpml' => array(
'label' => __( 'Use WPML to translate the text on the Steps and Buttons', 'wp-multi-step-checkout' ),
'input_form' => 'checkbox',
'value' => false,
'section' => 'titles',
'description' => __( 'For a multilingual website the translations from WPML will be used instead of the ones in this form', 'wp-multi-step-checkout' ),
),
);
return apply_filters( 'wmsc_settings_admin', $wmsc_settings );
}
}
if ( ! function_exists( 'get_wmsc_steps' ) ) {
/**
* The steps array.
* Note: The Login is always the first step and is not part of the get_wmsc_steps() array.
*/
function get_wmsc_steps() {
$steps = array(
'billing' => array(
'title' => __( 'Billing', 'wp-multi-step-checkout' ),
'position' => 10,
'class' => 'wpmc-step-billing',
'sections' => array( 'billing' ),
),
'shipping' => array(
'title' => __( 'Shipping', 'wp-multi-step-checkout' ),
'position' => 20,
'class' => 'wpmc-step-shipping',
'sections' => array( 'shipping' ),
),
'review' => array(
'title' => __( 'Order', 'wp-multi-step-checkout' ),
'position' => 30,
'class' => 'wpmc-step-review',
'sections' => array( 'review' ),
),
'payment' => array(
'title' => __( 'Payment', 'wp-multi-step-checkout' ),
'position' => 40,
'class' => 'wpmc-step-payment',
'sections' => array( 'payment' ),
),
);
return $steps;
}
}
if ( ! function_exists( 'wmsc_step_content_login' ) ) {
/**
* The content for the Login step.
*
* @param object $checkout The Checkout object from the WooCommerce plugin.
* @param bool $stop_at_login If the user should be logged in in order to checkout.
*/
function wmsc_step_content_login( $checkout, $stop_at_login ) { ?>