Below is a differential between the unpatched vulnerable code and the patched update, for reference.
--- a/woolentor-addons/includes/addons/wb_ever_compare_table.php
+++ b/woolentor-addons/includes/addons/wb_ever_compare_table.php
@@ -82,7 +82,7 @@
);
$this->add_group_control(
- ElementorGroup_Control_Typography::get_type(),
+ Group_Control_Typography::get_type(),
[
'name' => 'heading_typography',
'label' => __( 'Typography', 'woolentor' ),
@@ -194,6 +194,130 @@
$this->end_controls_section();
+ // Link Share Button Style
+ $this->start_controls_section(
+ 'link_share_button_style_section',
+ [
+ 'label' => __( 'Link Share Button', 'woolentor' ),
+ 'tab' => Controls_Manager::TAB_STYLE,
+ ]
+ );
+
+ $this->add_group_control(
+ Group_Control_Typography::get_type(),
+ [
+ 'name' => 'share_button_typography',
+ 'label' => __( 'Typography', 'woolentor' ),
+ 'selector' => '{{WRAPPER}} .ever-compare-shareable-link .evercompare-copy-link',
+ ]
+ );
+
+ $this->add_control(
+ 'share_button_padding',
+ [
+ 'label' => esc_html__( 'Padding', 'woolentor' ),
+ 'type' => Controls_Manager::DIMENSIONS,
+ 'size_units' => [ 'px', '%', 'em', 'rem' ],
+ 'selectors' => [
+ '{{WRAPPER}} .ever-compare-shareable-link .evercompare-copy-link' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
+ ],
+ ]
+ );
+
+ $this->start_controls_tabs('share_button_style_tabs');
+
+ $this->start_controls_tab(
+ 'share_button_normal_tab',
+ [
+ 'label' => __( 'Normal', 'woolentor' ),
+ ]
+ );
+
+ $this->add_control(
+ 'share_button_normal_color',
+ [
+ 'label' => __( 'Color', 'woolentor' ),
+ 'type' => Controls_Manager::COLOR,
+ 'selectors' => [
+ '{{WRAPPER}} .ever-compare-shareable-link .evercompare-copy-link' => 'color: {{VALUE}}',
+ ],
+ ]
+ );
+
+ $this->add_group_control(
+ Group_Control_Background::get_type(),
+ [
+ 'name' => 'share_button_normal_background',
+ 'label' => __( 'Background', 'woolentor' ),
+ 'types' => [ 'classic', 'gradient' ],
+ 'selector' => '{{WRAPPER}} .ever-compare-shareable-link .evercompare-copy-link',
+ 'exclude' =>['image'],
+ 'fields_options'=>[
+ 'background'=>[
+ 'label'=>__( 'Background', 'woolentor' )
+ ]
+ ]
+ ]
+ );
+
+ $this->add_group_control(
+ Group_Control_Border::get_type(),
+ [
+ 'name' => 'share_button_normal_border',
+ 'selector' => '{{WRAPPER}} .ever-compare-shareable-link .evercompare-copy-link',
+ ]
+ );
+
+ $this->end_controls_tab();
+
+ $this->start_controls_tab(
+ 'share_button_hover_tab',
+ [
+ 'label' => __( 'Hover', 'woolentor' ),
+ ]
+ );
+
+ $this->add_control(
+ 'share_button_hover_color',
+ [
+ 'label' => __( 'Color', 'woolentor' ),
+ 'type' => Controls_Manager::COLOR,
+ 'selectors' => [
+ '{{WRAPPER}} .ever-compare-shareable-link .evercompare-copy-link:hover' => 'color: {{VALUE}}',
+ ],
+ ]
+ );
+
+ $this->add_group_control(
+ Group_Control_Background::get_type(),
+ [
+ 'name' => 'share_button_hover_background',
+ 'label' => __( 'Background', 'woolentor' ),
+ 'types' => [ 'classic', 'gradient' ],
+ 'selector' => '{{WRAPPER}} .ever-compare-shareable-link .evercompare-copy-link:hover',
+ 'exclude' =>['image'],
+ 'fields_options'=>[
+ 'background'=>[
+ 'label'=>__( 'Background', 'woolentor' )
+ ]
+ ]
+ ]
+ );
+
+ $this->add_group_control(
+ Group_Control_Border::get_type(),
+ [
+ 'name' => 'share_button_hover_border',
+ 'selector' => '{{WRAPPER}} .ever-compare-shareable-link .evercompare-copy-link:hover',
+ ]
+ );
+
+ $this->end_controls_tab();
+
+ $this->end_controls_tabs();
+
+ $this->end_controls_section();
+
}
protected function render( $instance = [] ) {
--- a/woolentor-addons/includes/admin-panel/includes/classes/Admin/Options_field.php
+++ b/woolentor-addons/includes/admin-panel/includes/classes/Admin/Options_field.php
@@ -2787,176 +2787,6 @@
),
array(
- 'id' => 'woolentor_shopify_checkout_settings',
- 'name' => esc_html__( 'Shopify Style Checkout', 'woolentor' ),
- 'type' => 'module',
- 'default' => 'off',
- 'section' => 'woolentor_shopify_checkout_settings',
- 'option_id'=> 'enable',
- 'require_settings' => true,
- 'documentation' => esc_url('https://woolentor.com/doc/how-to-make-woocommerce-checkout-like-shopify/'),
- 'preview' => esc_url('https://www.youtube.com/watch?v=z12cq8XmgPQ'),
- 'setting_fields' => array(
-
- array(
- 'id' => 'enable',
- 'name' => esc_html__( 'Enable / Disable', 'woolentor' ),
- 'desc' => esc_html__( 'You can enable / disable shopify style checkout page from here.', 'woolentor' ),
- 'type' => 'checkbox',
- 'default' => 'off',
- 'class' => 'woolentor-action-field-left'
- ),
-
- array(
- 'id' => 'logo',
- 'name' => esc_html__( 'Logo', 'woolentor' ),
- 'desc' => esc_html__( 'You can upload your logo for shopify style checkout page from here.', 'woolentor' ),
- 'type' => 'imageupload',
- 'options' => [
- 'button_label' => esc_html__( 'Upload', 'woolentor' ),
- 'button_remove_label' => esc_html__( 'Remove', 'woolentor' ),
- ],
- 'class' => 'woolentor-action-field-left'
- ),
-
- array(
- 'id' => 'logo_page',
- 'name' => esc_html__( 'Logo URL', 'woolentor' ),
- 'desc' => esc_html__( 'Link your logo to an existing page or a custom URL.', 'woolentor' ),
- 'type' => 'select',
- 'options' => (['custom'=> esc_html__( 'Custom URL', 'woolentor' )] + woolentor_post_name( 'page', ['limit'=>-1] )),
- 'default' => '0',
- 'condition' => [
- 'key' => 'logo',
- 'operator' => '!=',
- 'value' => ''
- ],
- 'class' => 'woolentor-action-field-left'
- ),
-
- array(
- 'id' => 'logo_custom_url',
- 'name' => esc_html__( 'Custom URL', 'woolentor' ),
- 'desc' => esc_html__( 'Insert a custom URL for the logo.', 'woolentor' ),
- 'type' => 'text',
- 'placeholder' => esc_html__( 'your-domain.com', 'woolentor' ),
- 'condition' => [
- 'key' => 'logo_page',
- 'operator' => '==',
- 'value' => 'custom'
- ],
- 'class' => 'woolentor-action-field-left'
- ),
-
- array(
- 'id' => 'custommenu',
- 'name' => esc_html__( 'Bottom Menu', 'woolentor' ),
- 'desc' => esc_html__( 'You can choose menu for shopify style checkout page.', 'woolentor' ),
- 'type' => 'select',
- 'default' => '0',
- 'options' => array( '0'=> esc_html__('Select Menu','woolentor') ) + woolentor_get_all_create_menus(),
- 'class' => 'woolentor-action-field-left'
- ),
-
- array(
- 'id' => 'show_phone',
- 'name' => esc_html__( 'Show Phone Number Field', 'woolentor' ),
- 'desc' => esc_html__( 'Show the Phone Number Field.', 'woolentor' ),
- 'type' => 'checkbox',
- 'class' => 'woolentor-action-field-left'
- ),
-
- array(
- 'id' => 'show_company',
- 'name' => esc_html__( 'Show Company Name Field', 'woolentor' ),
- 'desc' => esc_html__( 'Show the Company Name Field.', 'woolentor' ),
- 'type' => 'checkbox',
- 'class' => 'woolentor-action-field-left'
- ),
-
- array(
- 'id' => 'hide_cart_nivigation',
- 'name' => esc_html__( 'Hide Cart Navigation', 'woolentor' ),
- 'desc' => esc_html__( 'Hide the "Cart" menu and "Return to cart" button.', 'woolentor' ),
- 'type' => 'checkbox',
- 'class' => 'woolentor-action-field-left'
- ),
-
- array(
- 'id' => 'hide_shipping_step',
- 'name' => esc_html__( 'Hide Shipping Step', 'woolentor' ),
- 'desc' => esc_html__( 'Turn it ON to hide the "Shipping" Step.', 'woolentor' ),
- 'type' => 'checkbox',
- 'class' => 'woolentor-action-field-left'
- ),
-
- array(
- 'id' => 'customize_labels',
- 'name' => esc_html__( 'Rename Labels?', 'woolentor' ),
- 'desc' => esc_html__( 'Enable it to customize labels of the checkout page.', 'woolentor' ),
- 'type' => 'checkbox',
- 'class' => 'woolentor-action-field-left'
- ),
-
- array(
- 'id' => 'labels_list',
- 'name' => esc_html__( 'Labels', 'woolentor' ),
- 'type' => 'repeater',
- 'title_field' => 'select_tab',
- 'condition' => [
- 'key' => 'customize_labels',
- 'operator' => '==',
- 'value' => 'on'
- ],
- 'options' => [
- 'button_label' => esc_html__( 'Add Custom Label', 'woolentor' ),
- ],
- 'max_items' => '3',
- 'fields' => [
-
- array(
- 'id' => 'select_tab',
- 'name' => esc_html__( 'Select Tab', 'woolentor' ),
- 'desc' => esc_html__( 'Select the tab for which you want to change the labels. ', 'woolentor' ),
- 'type' => 'select',
- 'class' => 'woolentor-action-field-left',
- 'default' => 'information',
- 'options' => array(
- 'information' => esc_html__('Information','woolentor'),
- 'shipping' => esc_html__('Shipping','woolentor'),
- 'payment' => esc_html__('Payment','woolentor'),
- ),
- ),
-
- array(
- 'id' => 'tab_label',
- 'name' => esc_html__( 'Tab Label', 'woolentor' ),
- 'type' => 'text',
- 'class' => 'woolentor-action-field-left',
- ),
-
- array(
- 'id' => 'label_1',
- 'name' => esc_html__( 'Button Label One', 'woolentor' ),
- 'type' => 'text',
- 'class' => 'woolentor-action-field-left',
- ),
-
- array(
- 'id' => 'label_2',
- 'name' => esc_html__( 'Button Label Two', 'woolentor' ),
- 'type' => 'text',
- 'class' => 'woolentor-action-field-left',
- ),
-
- ]
- ),
-
- )
-
- ),
-
- array(
'id' => 'woolentor_flash_sale_settings',
'name' => esc_html__( 'Flash Sale Countdown', 'woolentor' ),
'type' => 'module',
--- a/woolentor-addons/includes/admin-panel/includes/classes/Api/ChangeLog.php
+++ b/woolentor-addons/includes/admin-panel/includes/classes/Api/ChangeLog.php
@@ -164,6 +164,32 @@
private function get_changelog_data() {
return [
[
+ 'version' => '3.3.8',
+ 'date' => '2026-04-12',
+ 'changes' => [
+ 'New Features' => [
+ 'Show Currency Name and Show Currency Symbol option added in currency Switcher Elementor addon and Gutenberg block.',
+ 'Dropdown and currency selected area width control option in Elementor addon and Gutenberg block.',
+ 'Link Share button style option added in Compare table elementor addon.',
+ 'Shopify like Checkout module Theme Header and Footer enable/disable option and logo area enable/disable option if theme header footer enable.',
+ 'Nested Tree view in category list elementor widget. (Pro)'
+ ],
+ 'Improved' => [
+ 'Template library design for batter UI.',
+ 'Currency Switcher field with search input.',
+ ],
+ 'Fixes' => [
+ 'Wishlist table setting heading saving issue if column is empty.',
+ 'Compare table setting heading saving issue if column is empty.',
+ 'Lighthouse accessibility audit failures issue with slick slider.',
+ 'Single Product Navigation Gutenberg block Icon showing issue. (Pro)'
+ ],
+ 'Compatibility' => [
+ 'Latest WordPress and WooCommerce version.',
+ ],
+ ],
+ ],
+ [
'version' => '3.3.6',
'date' => '2026-03-29',
'changes' => [
--- a/woolentor-addons/includes/admin-panel/includes/classes/Api/Custom_Actions.php
+++ b/woolentor-addons/includes/admin-panel/includes/classes/Api/Custom_Actions.php
@@ -88,6 +88,19 @@
}
try {
+ // Validate callback against allowlist to prevent arbitrary function execution
+ $allowed_callbacks = apply_filters('woolentor_allowed_custom_action_callbacks', [
+ 'woolentor_currency_exchange_rate',
+ ]);
+
+ if (!in_array($callback, $allowed_callbacks, true)) {
+ return new WP_Error(
+ 'invalid_callback',
+ __('Callback not permitted', 'woolentor'),
+ ['status' => 403]
+ );
+ }
+
// Check if callback exists and is callable
if (!is_callable($callback)) {
throw new Exception(__('Invalid callback function', 'woolentor'));
--- a/woolentor-addons/includes/modules/class.module-manager.php
+++ b/woolentor-addons/includes/modules/class.module-manager.php
@@ -163,9 +163,9 @@
'section' => 'woolentor_shopify_checkout_settings',
'default' => 'off'
],
- 'main_class' => '',
+ 'main_class' => 'WoolentorModulesShopifyLikeCheckoutShopify_Like_Checkout',
'is_pro' => false,
- 'manage_setting' => false
+ 'manage_setting' => true
],
'variation-swatch' => [
'slug' =>'variation-swatch',
--- a/woolentor-addons/includes/modules/compare/includes/classes/Frontend/Manage_Compare.php
+++ b/woolentor-addons/includes/modules/compare/includes/classes/Frontend/Manage_Compare.php
@@ -192,7 +192,7 @@
?>
<div class="ever-compare-shareable-link <?php echo esc_attr( $button_pos );?>">
<button class="evercompare-copy-link" data-copytext="<?php echo esc_attr( $aftercopy_buttonText ); ?>" data-btntext="<?php echo esc_attr( $buttonText ); ?>"><?php echo esc_html($buttonText); ?></button>
- <p style="display: none;" class="evercompare-share-link"><?php echo $shareablelink; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></p>
+ <p style="display: none;" class="evercompare-share-link" data-sharelink="<?php echo esc_url( $shareablelink ); ?>"> </p>
</div>
<?php
@@ -634,25 +634,7 @@
* @return [string]
*/
public function field_name( $field = '', $custom = false ){
-
- if( empty( $field ) ){
- return;
- }
-
- if( $custom === true ){
- return $field;
- }
-
- $default = ever_compare_get_default_fields();
-
- $str = substr( $field, 0, 3 );
- if( 'pa_' === $str ){
- $field_name = wc_attribute_label( $field );
- }else{
- $field_name = !empty( $default[$field] ) ? $default[$field] : '';
- }
- return $field_name;
-
+ return ever_compare_field_name( $field, $custom );
}
--- a/woolentor-addons/includes/modules/compare/includes/helper-functions.php
+++ b/woolentor-addons/includes/modules/compare/includes/helper-functions.php
@@ -45,6 +45,34 @@
}
+/**
+ * [ever_compare_field_name]
+ * @param [string] $field
+ * @param [bool] $custom
+ * @return [string]
+ */
+function ever_compare_field_name( $field = '', $custom = false ){
+
+ if( empty( $field ) ){
+ return;
+ }
+
+ if( $custom === true ){
+ return $field;
+ }
+
+ $default = ever_compare_get_default_fields();
+
+ $str = substr( $field, 0, 3 );
+ if( 'pa_' === $str ){
+ $field_name = wc_attribute_label( $field );
+ }else{
+ $field_name = !empty( $default[$field] ) ? $default[$field] : '';
+ }
+ return $field_name;
+
+}
+
/**
* Get default fields List
@@ -104,7 +132,7 @@
$new_list = array();
$field_list = count( ever_compare_table_active_heading() ) > 0 ? ever_compare_table_active_heading() : ever_compare_get_default_fields();
foreach ( $field_list as $key => $value ) {
- $new_list[$key] = class_exists( 'EverCompareFrontendManage_Compare' ) ? EverCompareFrontendManage_Compare::instance()->field_name( $key ) : '';
+ $new_list[$key] = ever_compare_field_name( $key );
}
return $new_list;
}
--- a/woolentor-addons/includes/modules/currency-switcher/includes/blocks/currency-switcher/index.php
+++ b/woolentor-addons/includes/modules/currency-switcher/includes/blocks/currency-switcher/index.php
@@ -13,9 +13,13 @@
echo '<div class="'.esc_attr(implode(' ', $areaClasses )).'">';
$shortcode_attributes = [
'style' => $settings['currencyStyle'],
+ 'show_currency_name' => $settings['showCurrencyName'] ? 'yes' : 'no',
+ 'show_currency_symbol' => $settings['showCurrencySymbol'] ? 'yes' : 'no',
+ 'selected_show_currency_name' => $settings['selectedShowCurrencyName'] ? 'yes' : 'no',
+ 'selected_show_currency_symbol' => $settings['selectedShowCurrencySymbol'] ? 'yes' : 'no',
];
if( woolentor_is_pro() ){
- $shortcode_attributes['flags'] = $settings['showFlags'];
+ $shortcode_attributes['flags'] = $settings['showFlags'] ? 'yes' : 'no';
$shortcode_attributes['flag_style'] = $settings['flagStyle'];
}
echo woolentor_do_shortcode( 'woolentor_currency_switcher', $shortcode_attributes ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
--- a/woolentor-addons/includes/modules/currency-switcher/includes/classes/Admin/Fields.php
+++ b/woolentor-addons/includes/modules/currency-switcher/includes/classes/Admin/Fields.php
@@ -105,6 +105,7 @@
'name' => esc_html__( 'Currency', 'woolentor' ),
'type' => 'select',
'default' => $wc_currency,
+ 'searchable' => true,
'options' => woolentor_wc_currency_list(),
'class' => 'woolentor-action-field-left wlcs-currency-selection wlcs-currency-selection-field',
),
@@ -198,6 +199,7 @@
'type' => 'select',
'options' => woolentor_added_currency_list(),
'default' => $wc_currency,
+ 'searchable' => true,
'class' => 'woolentor-action-field-left wlcs-default-selection',
'condition' => [ 'key'=>'enable','operator'=> '==', 'value' => 'on' ],
),
--- a/woolentor-addons/includes/modules/currency-switcher/includes/classes/Frontend/Shortcode.php
+++ b/woolentor-addons/includes/modules/currency-switcher/includes/classes/Frontend/Shortcode.php
@@ -38,7 +38,11 @@
$default_atts = array(
'style' => 'dropdown',
'flags' => 'yes',
- 'flag_style' => 'circle' // square || circle
+ 'flag_style' => 'circle', // square || circle
+ 'show_currency_name' => 'yes',
+ 'show_currency_symbol' => 'yes',
+ 'selected_show_currency_name' => 'yes',
+ 'selected_show_currency_symbol' => 'yes'
);
$atts = shortcode_atts( $default_atts, $atts, $content );
@@ -85,7 +89,10 @@
)
: '';
- echo sprintf('<li %4$s data-value="%1$s">%5$s %2$s (%3$s)</li>', $currency['currency'], $wc_currencie_list[$currency['currency']], $currency_symbol, $active_currency, $flag ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
+ $currency_name = ( $atts['show_currency_name'] === 'yes' ) ? $wc_currencie_list[$currency['currency']] : '';
+ $currency_symbol = ( $atts['show_currency_symbol'] === 'yes' ) ? "(".$currency_symbol.")" : '';
+
+ echo sprintf('<li %4$s data-value="%1$s">%5$s %2$s %3$s</li>', $currency['currency'], $currency_name, $currency_symbol, $active_currency, $flag ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
}
?>
</ul>
@@ -93,7 +100,11 @@
<?php else: ?>
<div class="woolentor-selected-currency-wrap">
<span class="woolentor-selected-currency">
- <?php echo sprintf('%3$s %1$s (%2$s)', $wc_currencie_list[$current_currency_code], $current_currency_symbol, $current_currency_flag); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
+ <?php
+ $selected_currency_name = ( $atts['selected_show_currency_name'] === 'yes' ) ? $wc_currencie_list[$current_currency_code] : '';
+ $selected_currency_symbol = ( $atts['selected_show_currency_symbol'] === 'yes' ) ? "(".$current_currency_symbol.")" : '';
+ echo sprintf('%3$s %1$s %2$s', $selected_currency_name, $selected_currency_symbol, $current_currency_flag); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
+ ?>
</span>
<span class="woolentor-currency-dropdown-arrow"></span>
</div>
@@ -111,7 +122,10 @@
)
: '';
- echo sprintf('<li %4$s data-value="%1$s">%5$s %2$s (%3$s)</li>', $currency['currency'], $wc_currencie_list[$currency['currency']], $currency_symbol, $hide_currency, $flag); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
+ $currency_name = ( $atts['show_currency_name'] === 'yes' ) ? $wc_currencie_list[$currency['currency']] : '';
+ $currency_symbol = ( $atts['show_currency_symbol'] === 'yes' ) ? "(".$currency_symbol.")" : '';
+
+ echo sprintf('<li %4$s data-value="%1$s">%5$s %2$s %3$s</li>', $currency['currency'], $currency_name, $currency_symbol, $hide_currency, $flag); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
}
?>
</ul>
--- a/woolentor-addons/includes/modules/currency-switcher/includes/widgets/wl_currency_switcher.php
+++ b/woolentor-addons/includes/modules/currency-switcher/includes/widgets/wl_currency_switcher.php
@@ -53,6 +53,33 @@
]
]
);
+
+ $this->add_control(
+ 'show_currency_name',
+ [
+ 'label' => __( 'Show Currency Name?', 'woolentor' ),
+ 'type' => Controls_Manager::SWITCHER,
+ 'label_on' => __( 'Yes', 'woolentor' ),
+ 'label_off' => __( 'No', 'woolentor' ),
+ 'return_value' => 'yes',
+ 'default' => 'yes',
+ 'separator' => 'before',
+ ]
+ );
+
+ $this->add_control(
+ 'show_currency_symbol',
+ [
+ 'label' => __( 'Show Currency Symbol?', 'woolentor' ),
+ 'type' => Controls_Manager::SWITCHER,
+ 'label_on' => __( 'Yes', 'woolentor' ),
+ 'label_off' => __( 'No', 'woolentor' ),
+ 'return_value' => 'yes',
+ 'default' => 'yes',
+ 'separator' => 'after',
+ ]
+ );
+
if( woolentor_is_pro() ){
$this->add_control(
'show_flags',
@@ -82,6 +109,7 @@
],
]
);
+
}else{
$this->add_control(
'show_flags_pro',
@@ -122,6 +150,44 @@
$this->end_controls_section(); // General Settings
+ $this->start_controls_section(
+ 'section_selected_currency',
+ [
+ 'label' => __( 'Selected Currency', 'woolentor' ),
+ 'condition' => [
+ 'currency_style' => 'dropdown',
+ ]
+ ]
+ );
+
+ $this->add_control(
+ 'selected_show_currency_name',
+ [
+ 'label' => __( 'Show Currency Name?', 'woolentor' ),
+ 'type' => Controls_Manager::SWITCHER,
+ 'label_on' => __( 'Yes', 'woolentor' ),
+ 'label_off' => __( 'No', 'woolentor' ),
+ 'return_value' => 'yes',
+ 'default' => 'yes',
+ 'separator' => 'before',
+ ]
+ );
+
+ $this->add_control(
+ 'selected_show_currency_symbol',
+ [
+ 'label' => __( 'Show Currency Symbol?', 'woolentor' ),
+ 'type' => Controls_Manager::SWITCHER,
+ 'label_on' => __( 'Yes', 'woolentor' ),
+ 'label_off' => __( 'No', 'woolentor' ),
+ 'return_value' => 'yes',
+ 'default' => 'yes',
+ 'separator' => 'before',
+ ]
+ );
+
+ $this->end_controls_section(); // Selected Currency
+
// Currency Style Controls.
$this->start_controls_section(
'style_currency_section',
@@ -193,6 +259,36 @@
]
);
+ $this->add_control(
+ 'currency_dropdown_width',
+ [
+ 'label' => esc_html__( 'Dropdown Width', 'woolentor' ),
+ 'type' => Controls_Manager::SLIDER,
+ 'size_units' => [ 'px', '%', 'em', 'rem' ],
+ 'range' => [
+ 'px' => [
+ 'min' => 0,
+ 'max' => 1000,
+ 'step' => 1,
+ ],
+ '%' => [
+ 'min' => 0,
+ 'max' => 100,
+ ],
+ ],
+ 'default' => [
+ 'unit' => '%',
+ 'size' => 100,
+ ],
+ 'selectors' => [
+ '{{WRAPPER}} .woolentor-currency-dropdown' => 'width: {{SIZE}}{{UNIT}};',
+ ],
+ 'condition' => [
+ 'currency_style' => 'dropdown',
+ ],
+ ]
+ );
+
$this->end_controls_section(); // End Currency Style Controls.
// Current Currency Style Controls.
@@ -262,6 +358,36 @@
],
]
);
+
+ $this->add_control(
+ 'selected_currency_area_width',
+ [
+ 'label' => esc_html__( 'Area Width', 'woolentor' ),
+ 'type' => Controls_Manager::SLIDER,
+ 'size_units' => [ 'px', '%', 'em', 'rem' ],
+ 'range' => [
+ 'px' => [
+ 'min' => 0,
+ 'max' => 1000,
+ 'step' => 1,
+ ],
+ '%' => [
+ 'min' => 0,
+ 'max' => 100,
+ ],
+ ],
+ 'default' => [
+ 'unit' => '%',
+ 'size' => 100,
+ ],
+ 'selectors' => [
+ '{{WRAPPER}} .woolentor-selected-currency-wrap' => 'width: {{SIZE}}{{UNIT}};',
+ ],
+ 'condition' => [
+ 'currency_style' => 'dropdown',
+ ],
+ ]
+ );
$this->end_controls_section(); // End Style Controls.
@@ -272,6 +398,10 @@
$shortcode_attributes = [
'style' => $settings['currency_style'],
+ 'show_currency_name' => $settings['show_currency_name'],
+ 'show_currency_symbol' => $settings['show_currency_symbol'],
+ 'selected_show_currency_name' => $settings['selected_show_currency_name'],
+ 'selected_show_currency_symbol' => $settings['selected_show_currency_symbol'],
];
if( woolentor_is_pro() ){
--- a/woolentor-addons/includes/modules/shopify-like-checkout/includes/classes/Admin.php
+++ b/woolentor-addons/includes/modules/shopify-like-checkout/includes/classes/Admin.php
@@ -0,0 +1,39 @@
+<?php
+namespace WoolentorModulesShopifyLikeCheckout;
+use WooLentorTraitsSingleton;
+if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
+
+/**
+ * Admin handlers class
+ */
+class Admin {
+ use Singleton;
+
+ /**
+ * Initialize the class
+ */
+ private function __construct() {
+ $this->includes();
+ $this->init();
+ }
+
+ /**
+ * Load Required files
+ *
+ * @return void
+ */
+ private function includes(){
+ require_once( __DIR__. '/Admin/Fields.php' );
+ }
+
+ /**
+ * Initialize
+ *
+ * @return void
+ */
+ public function init(){
+ AdminFields::instance();
+ }
+
+
+}
No newline at end of file
--- a/woolentor-addons/includes/modules/shopify-like-checkout/includes/classes/Admin/Fields.php
+++ b/woolentor-addons/includes/modules/shopify-like-checkout/includes/classes/Admin/Fields.php
@@ -0,0 +1,217 @@
+<?php
+namespace WoolentorModulesShopifyLikeCheckoutAdmin;
+use WooLentorTraitsSingleton;
+
+if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
+
+class Fields {
+ use Singleton;
+
+ public function __construct(){
+ add_filter( 'woolentor_admin_fields_vue', [ $this, 'admin_fields' ], 10, 1 );
+ }
+
+ /**
+ * Admin Field Register
+ * @param mixed $fields
+ * @return mixed
+ */
+ public function admin_fields( $fields ){
+
+ if ( ! isset( $fields['woolentor_others_tabs'] ) || ! is_array( $fields['woolentor_others_tabs'] ) ) {
+ return $fields;
+ }
+
+ array_splice( $fields['woolentor_others_tabs'], 2, 0, $this->setting_fields() );
+ return $fields;
+ }
+
+ /**
+ * Setting Fields
+ * @return array
+ */
+ public function setting_fields(){
+ $fields = [
+ [
+ 'id' => 'woolentor_shopify_checkout_settings',
+ 'name' => esc_html__( 'Shopify Style Checkout', 'woolentor' ),
+ 'type' => 'module',
+ 'default' => 'off',
+ 'section' => 'woolentor_shopify_checkout_settings',
+ 'option_id'=> 'enable',
+ 'require_settings' => true,
+ 'documentation' => esc_url('https://woolentor.com/doc/how-to-make-woocommerce-checkout-like-shopify/'),
+ 'preview' => esc_url('https://www.youtube.com/watch?v=z12cq8XmgPQ'),
+ 'setting_fields' => array(
+
+ array(
+ 'id' => 'enable',
+ 'name' => esc_html__( 'Enable / Disable', 'woolentor' ),
+ 'desc' => esc_html__( 'You can enable / disable shopify style checkout page from here.', 'woolentor' ),
+ 'type' => 'checkbox',
+ 'default' => 'off',
+ 'class' => 'woolentor-action-field-left'
+ ),
+
+ array(
+ 'id' => 'logo',
+ 'name' => esc_html__( 'Logo', 'woolentor' ),
+ 'desc' => esc_html__( 'You can upload your logo for shopify style checkout page from here.', 'woolentor' ),
+ 'type' => 'imageupload',
+ 'options' => [
+ 'button_label' => esc_html__( 'Upload', 'woolentor' ),
+ 'button_remove_label' => esc_html__( 'Remove', 'woolentor' ),
+ ],
+ 'class' => 'woolentor-action-field-left'
+ ),
+
+ array(
+ 'id' => 'logo_page',
+ 'name' => esc_html__( 'Logo URL', 'woolentor' ),
+ 'desc' => esc_html__( 'Link your logo to an existing page or a custom URL.', 'woolentor' ),
+ 'type' => 'select',
+ 'options' => (['custom'=> esc_html__( 'Custom URL', 'woolentor' )] + woolentor_post_name( 'page', ['limit'=>-1] )),
+ 'default' => '0',
+ 'condition' => array( 'key'=>'logo','operator'=> '!=','value'=> '' ),
+ 'class' => 'woolentor-action-field-left'
+ ),
+
+ array(
+ 'id' => 'logo_custom_url',
+ 'name' => esc_html__( 'Custom URL', 'woolentor' ),
+ 'desc' => esc_html__( 'Insert a custom URL for the logo.', 'woolentor' ),
+ 'type' => 'text',
+ 'placeholder' => esc_html__( 'your-domain.com', 'woolentor' ),
+ 'condition' => array( 'key'=>'logo_page','operator'=> '==', 'value'=>'custom' ),
+ 'class' => 'woolentor-action-field-left'
+ ),
+
+ array(
+ 'id' => 'custommenu',
+ 'name' => esc_html__( 'Bottom Menu', 'woolentor' ),
+ 'desc' => esc_html__( 'You can choose menu for shopify style checkout page.', 'woolentor' ),
+ 'type' => 'select',
+ 'default' => '0',
+ 'options' => array( '0'=> esc_html__('Select Menu','woolentor') ) + woolentor_get_all_create_menus(),
+ 'class' => 'woolentor-action-field-left'
+ ),
+
+ array(
+ 'id' => 'enable_header_footer',
+ 'name' => esc_html__( 'Enable Theme Header & Footer', 'woolentor' ),
+ 'desc' => esc_html__( 'Display your active theme's header and footer on the Shopify-like checkout page. The checkout form is wrapped in a CSS isolation layer to prevent theme styles from breaking the design, but minor visual differences may still occur depending on your theme.', 'woolentor' ),
+ 'type' => 'checkbox',
+ 'class' => 'woolentor-action-field-left'
+ ),
+ array(
+ 'id' => 'hide_logo_on_header_footer',
+ 'name' => esc_html__( 'Hide Checkout Logo', 'woolentor' ),
+ 'desc' => esc_html__( 'Hide the logo area inside the checkout form when the Theme Header & Footer is enabled, to avoid duplicating the logo that already appears in the theme header.', 'woolentor' ),
+ 'type' => 'checkbox',
+ 'class' => 'woolentor-action-field-left',
+ 'condition' => [
+ 'key' => 'enable_header_footer',
+ 'operator' => '==',
+ 'value' => 'on'
+ ],
+ ),
+
+ array(
+ 'id' => 'show_phone',
+ 'name' => esc_html__( 'Show Phone Number Field', 'woolentor' ),
+ 'desc' => esc_html__( 'Show the Phone Number Field.', 'woolentor' ),
+ 'type' => 'checkbox',
+ 'class' => 'woolentor-action-field-left'
+ ),
+
+ array(
+ 'id' => 'show_company',
+ 'name' => esc_html__( 'Show Company Name Field', 'woolentor' ),
+ 'desc' => esc_html__( 'Show the Company Name Field.', 'woolentor' ),
+ 'type' => 'checkbox',
+ 'class' => 'woolentor-action-field-left'
+ ),
+
+ array(
+ 'id' => 'hide_cart_nivigation',
+ 'name' => esc_html__( 'Hide Cart Navigation', 'woolentor' ),
+ 'desc' => esc_html__( 'Hide the "Cart" menu and "Return to cart" button.', 'woolentor' ),
+ 'type' => 'checkbox',
+ 'class' => 'woolentor-action-field-left'
+ ),
+
+ array(
+ 'id' => 'hide_shipping_step',
+ 'name' => esc_html__( 'Hide Shipping Step', 'woolentor' ),
+ 'desc' => esc_html__( 'Turn it ON to hide the "Shipping" Step.', 'woolentor' ),
+ 'type' => 'checkbox',
+ 'class' => 'woolentor-action-field-left'
+ ),
+
+ array(
+ 'id' => 'customize_labels',
+ 'name' => esc_html__( 'Rename Labels?', 'woolentor' ),
+ 'desc' => esc_html__( 'Enable it to customize labels of the checkout page.', 'woolentor' ),
+ 'type' => 'checkbox',
+ 'class' => 'woolentor-action-field-left'
+ ),
+
+ array(
+ 'id' => 'labels_list',
+ 'name' => esc_html__( 'Labels', 'woolentor' ),
+ 'type' => 'repeater',
+ 'title_field' => 'select_tab',
+ 'condition' => array( 'key'=>'customize_labels', 'operator'=>'==', 'value'=>'on' ),
+ 'max_items' => '3',
+ 'options' => [
+ 'button_label' => esc_html__( 'Add Custom Label', 'woolentor' ),
+ ],
+ 'fields' => [
+
+ array(
+ 'id' => 'select_tab',
+ 'name' => esc_html__( 'Select Tab', 'woolentor' ),
+ 'desc' => esc_html__( 'Select the tab for which you want to change the labels. ', 'woolentor' ),
+ 'type' => 'select',
+ 'class' => 'woolentor-action-field-left',
+ 'default' => 'information',
+ 'options' => array(
+ 'information' => esc_html__('Information','woolentor'),
+ 'shipping' => esc_html__('Shipping','woolentor'),
+ 'payment' => esc_html__('Payment','woolentor'),
+ ),
+ ),
+
+ array(
+ 'id' => 'tab_label',
+ 'name' => esc_html__( 'Tab Label', 'woolentor' ),
+ 'type' => 'text',
+ 'class' => 'woolentor-action-field-left',
+ ),
+
+ array(
+ 'id' => 'label_1',
+ 'name' => esc_html__( 'Button Label One', 'woolentor' ),
+ 'type' => 'text',
+ 'class' => 'woolentor-action-field-left',
+ ),
+
+ array(
+ 'id' => 'label_2',
+ 'name' => esc_html__( 'Button Label Two', 'woolentor' ),
+ 'type' => 'text',
+ 'class' => 'woolentor-action-field-left',
+ ),
+
+ ]
+ ),
+
+ )
+
+ ]
+ ];
+
+ return $fields;
+ }
+
+}
No newline at end of file
--- a/woolentor-addons/includes/modules/shopify-like-checkout/includes/classes/Frontend.php
+++ b/woolentor-addons/includes/modules/shopify-like-checkout/includes/classes/Frontend.php
@@ -0,0 +1,33 @@
+<?php
+namespace WoolentorModulesShopifyLikeCheckout;
+use WooLentorTraitsSingleton;
+
+/**
+ * Frontend handlers class
+ */
+class Frontend {
+ use Singleton;
+
+ /**
+ * Initialize the class
+ */
+ private function __construct() {
+ $this->includes();
+ $this->init();
+ }
+
+ /**
+ * Include necessary files
+ */
+ public function includes(){
+ require_once( __DIR__. '/Frontend/Manage_Checkout.php' );
+ }
+
+ /**
+ * Initialize the class
+ */
+ public function init(){
+ FrontendManage_Checkout::instance();
+ }
+
+}
No newline at end of file
--- a/woolentor-addons/includes/modules/shopify-like-checkout/includes/classes/Frontend/Manage_Checkout.php
+++ b/woolentor-addons/includes/modules/shopify-like-checkout/includes/classes/Frontend/Manage_Checkout.php
@@ -0,0 +1,796 @@
+<?php
+namespace WoolentorModulesShopifyLikeCheckoutFrontend;
+use WooLentorTraitsSingleton;
+use const WoolentorModulesShopifyLikeCheckoutTEMPLATE_PATH;
+use const WoolentorModulesShopifyLikeCheckoutMODULE_ASSETS;
+
+if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
+
+class Manage_Checkout extends WC_Checkout{
+ use Singleton;
+ public $hide_billing_company = true;
+ public $hide_billing_phone = true;
+ public $field_manager_enable = false;
+ public $enable_header_footer = false;
+
+ /**
+ * Constructor
+ */
+ function __construct(){
+ $this->hide_billing_company = woolentor_get_option( 'show_company', 'woolentor_shopify_checkout_settings', 'off' ) === 'on' ? false : apply_filters('woolentor_slc_hide_billing_company', true);
+ $this->hide_billing_phone = woolentor_get_option( 'show_phone', 'woolentor_shopify_checkout_settings', 'off' ) === 'on' ? false : apply_filters('woolentor_slc_hide_billing_phone', true);
+ $this->enable_header_footer = woolentor_get_option( 'enable_header_footer', 'woolentor_shopify_checkout_settings', 'off' ) === 'on';
+
+ // Field Manager Active status
+ if( woolentor_get_option( 'billing_enable', 'woolentor_checkout_fields', 'off' ) == 'on' || woolentor_get_option( 'shipping_enable', 'woolentor_checkout_fields', 'off' ) == 'on' ){
+ $this->field_manager_enable = true;
+ }
+
+ // Enqueue scripts
+ add_action( 'wp_enqueue_scripts', [ $this, 'enqueue_scripts' ], 999 );
+
+ // Remove theme styling
+ add_filter( 'style_loader_tag', [ $this, 'style_loader_tag_filter' ], 10, 4 );
+
+ // Remove Terms and conditions.
+ remove_action( 'woocommerce_checkout_terms_and_conditions', 'wc_terms_and_conditions_page_content', 30 );
+
+ // Override wc templates
+ add_filter('wc_get_template', [ $this, 'wc_get_template_filter' ], 9999, 5);
+
+ // Override and set to canvas template
+ add_filter( 'template_include', [ $this, 'template_include_filter' ], 9999 );
+
+ // Reorder checkout fields
+ add_filter('woocommerce_checkout_fields', [ $this, 'woocommerce_checkout_fields_filter' ] );
+ add_filter('woocommerce_default_address_fields', [ $this, 'reorder_checkout_default_fields' ] );
+
+ // Update order review fragments
+ add_filter( 'woocommerce_update_order_review_fragments', [ $this, 'woocommerce_update_order_review_fragments_filter' ], 99, 2 );
+
+ // Validate first step fields by custom managed ajax
+ add_action('template_redirect', [ $this, 'validate_1st_step' ] );
+
+ add_filter('woocommerce_form_field_args', [ $this, 'woocommerce_form_field_args_filter' ], 10 , 3);
+ }
+
+ /**
+ * Enqueue scripts
+ */
+ public function enqueue_scripts(){
+ if( !$this->is_checkout() ){
+ return;
+ }
+
+ // if ( ! $this->enable_header_footer && apply_filters( 'woolentor_wc_styles_dependency', true ) ) {
+ if ( apply_filters( 'woolentor_wc_styles_dependency', true ) ) {
+
+ wp_dequeue_style( 'woocommerce-layout' );
+ wp_dequeue_style( 'woocommerce-smallscreen' );
+ wp_dequeue_style( 'woocommerce-general' );
+
+ //Over Confirm for Default style
+ wp_deregister_style( 'woocommerce-layout' );
+ wp_deregister_style( 'woocommerce-smallscreen' );
+ wp_deregister_style( 'woocommerce-general' );
+
+ }
+
+ // Styles
+ wp_enqueue_style( 'woolentor-shopify-like-checkout', MODULE_ASSETS . '/shopify-like-checkout.css' ,[], WOOLENTOR_VERSION, 'all' );
+
+ // Scripts
+ $suffix = AutomatticJetpackConstants::is_true( 'SCRIPT_DEBUG' ) ? '' : '.min';
+ wp_enqueue_script( 'serializejson', WC()->plugin_url() . '/assets/js/jquery-serializejson/jquery.serializejson' . $suffix . '.js', array( 'jquery' ), '2.8.1', true );
+ wp_enqueue_script( 'woolentor-checkout');
+ wp_enqueue_script( 'woolentor-shopify-like-checkout', MODULE_ASSETS . '/shopify-like-checkout.js', array('jquery', 'wc-checkout'), WOOLENTOR_VERSION, true );
+ wp_localize_script( 'woolentor-shopify-like-checkout', 'woolentor_slc_params',
+ array(
+ 'ajax_url' => admin_url( 'admin-ajax.php' ),
+ 'nonce' => wp_create_nonce('woolentor_slc_nonce') // Nonce for shopify like checkout
+ )
+ );
+
+ }
+
+ /**
+ * Check if the current page is checkout
+ */
+ public function is_checkout(){
+ if( is_checkout() && !is_wc_endpoint_url() ){
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
+ * Set canvas template file path for the checkout page
+ */
+ public function template_include_filter( $template ){
+ if( !$this->is_checkout() ){
+ return $template;
+ }
+
+ // If checkout registration is disabled and not logged in, the user cannot checkout.
+ if ( ! WC()->Checkout()->is_registration_enabled() && WC()->Checkout()->is_registration_required() && ! is_user_logged_in() ) {
+ return $template;
+ }
+
+ if( is_checkout() && !is_wc_endpoint_url() ){
+ $template = TEMPLATE_PATH . 'canvas.php';
+ }
+
+ return $template;
+ }
+
+ /**
+ * Override the woocommerce default template files
+ */
+ public function wc_get_template_filter( $template, $template_name, $args, $template_path, $default_path ){
+ if( !$this->is_checkout() ){
+ return $template;
+ }
+
+ // If checkout registration is disabled and not logged in, the user cannot checkout.
+ if ( ! WC()->Checkout()->is_registration_enabled() && WC()->Checkout()->is_registration_required() && ! is_user_logged_in() ) {
+ return $template;
+ }
+
+ if($template_name == 'checkout/form-checkout.php'){
+ $template = wc_locate_template('form-checkout.php', 'wl-woo-templates/shopify-like-checkout', TEMPLATE_PATH);
+ }
+
+ if($template_name == 'checkout/form-billing.php'){
+ $template = wc_locate_template('form-billing.php', 'wl-woo-templates/shopify-like-checkout', TEMPLATE_PATH);
+ }
+
+ if($template_name == 'checkout/form-shipping.php'){
+ $template = wc_locate_template('form-shipping.php', 'wl-woo-templates/shopify-like-checkout', TEMPLATE_PATH);
+ }
+
+ if($template_name == 'cart/cart-shipping.php'){
+ $template = wc_locate_template('cart-shipping.php', 'wl-woo-templates/shopify-like-checkout', TEMPLATE_PATH);
+ }
+
+ if($template_name == 'checkout/payment.php'){
+ $template = wc_locate_template('payment.php', 'wl-woo-templates/shopify-like-checkout', TEMPLATE_PATH);
+ }
+
+ if($template_name == 'checkout/review-order.php'){
+ $template = wc_locate_template('review-order.php', 'wl-woo-templates/shopify-like-checkout', TEMPLATE_PATH);
+ }
+
+ if($template_name == 'checkout/form-coupon.php'){
+ $template = wc_locate_template('form-coupon.php', 'wl-woo-templates/shopify-like-checkout', TEMPLATE_PATH);
+ }
+
+ if(is_checkout() && $template_name == 'global/form-login.php'){
+ $template = wc_locate_template('form-login.php', 'wl-woo-templates/shopify-like-checkout', TEMPLATE_PATH);
+ }
+
+ return $template;
+ }
+
+ /**
+ * Reorder the checkout page address fields before render
+ */
+ public function woocommerce_checkout_fields_filter( $fieldset ){
+ if( !$this->is_checkout() ){
+ return $fieldset;
+ }
+
+ // Remove fields
+ if( isset($fieldset['billing']['billing_company']) && $this->hide_billing_company ){
+ unset($fieldset['billing']['billing_company']);
+ }
+
+ if( isset($fieldset['billing']['billing_phone']) && $this->hide_billing_phone ){
+ unset($fieldset['billing']['billing_phone']);
+ }
+
+ if( isset($fieldset['billing']['billing_email']) ){
+ $fieldset['billing']['billing_email']['priority'] = 1;
+ if( isset($fieldset['billing']['billing_email']['label']) ){
+ $fieldset['billing']['billing_email']['placeholder'] = $fieldset['billing']['billing_email']['label'];
+ }
+ }
+
+ // Set the order of the fields
+ $count = 0;
+ $priority = 10;
+
+ // Updating the 'priority' argument
+ foreach($this->get_address_field_keys('billing', $fieldset) as $field_name){
+ $count++;
+ $fieldset['billing'][$field_name]['priority'] = $count * $priority;
+
+ if( !isset($fieldset['billing'][$field_name]['placeholder']) ){
+ if( isset($fieldset['billing'][$field_name]['label']) ){
+ $fieldset['billing'][$field_name]['placeholder'] = $fieldset['billing'][$field_name]['label'];
+ }
+ }
+
+ // Customize classes
+ if( ( $this->field_manager_enable === false ) && ( $field_name == 'billing_country' || $field_name == 'billing_state' || $field_name == 'billing_postcode' ) ){
+ $fieldset['billing'][$field_name]['class'][] = 'woolentor-one-third';
+ }
+ }
+
+ foreach($this->get_address_field_keys('shipping', $fieldset) as $field_name){
+ if( !isset($fieldset['shipping'][$field_name]['placeholder']) ){
+ if( isset($fieldset['shipping'][$field_name]['label']) ){
+ $fieldset['shipping'][$field_name]['placeholder'] = $fieldset['shipping'][$field_name]['label'];
+ }
+ }
+
+ // Customize classes
+ if( ( $this->field_manager_enable === false ) && ($field_name == 'shipping_country' || $field_name == 'shipping_state' || $field_name == 'shipping_postcode') ){
+ $fieldset['shipping'][$field_name]['class'][] = 'woolentor-one-third';
+ }
+ }
+
+ return $fieldset;
+ }
+
+ /**
+ * Reorder the checkout page address fields after JS rendered
+ */
+ public function reorder_checkout_default_fields( $fields ){
+ if( !$this->is_checkout() ){
+ return $fields;
+ }
+
+ // remove fields
+ if( isset($fields['company']) && $this->hide_billing_company ){
+ unset($fields['company']);
+ }
+
+ if( isset($fields['phone']) && $this->hide_billing_phone ){
+ unset($fields['phone']);
+ }
+
+ $count = 0;
+ $priority = 10;
+
+ // Updating the 'priority' argument
+ $fields_order = array(
+ 'first_name',
+ 'last_name',
+ 'address_1',
+ 'address_2',
+ 'city',
+ 'country',
+ 'state',
+ 'postcode',
+ );
+
+ foreach($fields_order as $field_name){
+ $count++;
+ $fields[$field_name]['priority'] = $count * $priority;
+ }
+
+ return $fields;
+ }
+
+
+ /**
+ * It returns an array of keys from the $fieldset array
+ *
+ * Group The group name. e.g: shipping
+ * Fieldset Array of fields that you want to get the keys from.
+ */
+ public function get_address_field_keys( $group = '', $fieldset = array() ){
+ if( $group && $fieldset ){
+ return array_keys( $fieldset[$group] );
+ }
+
+ return array();
+ }
+
+ /**
+ * Update fragments
+ */
+ public function woocommerce_update_order_review_fragments_filter( $fragments ) {
+ ob_start();
+ woocommerce_order_review();
+ $fragments['.woocommerce-checkout-review-order-table'] = ob_get_clean();
+
+ ob_start();
+ if ( wc_sh