@@ -1,24 +1,24 @@ |
||
| 1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
| 2 | - if( !empty($shipping_mode_option) && !empty($shipping_mode_option['modes']) ) : ?> |
|
| 3 | -<div class="wps-alert-error" id="wps_shipping_config_save_message" style="display : none"><span class="dashicons dashicons-info"></span> <?php _e( 'Process saving, please wait...', 'wpshop'); ?></div> |
|
| 4 | -<div class="wps-alert-info"><span class="dashicons dashicons-lightbulb"></span> <?php printf( __( 'Offer a new shipping service to your customer with <a href="%s" target="_blank">So Colissimo or another shipping mode</a>', 'wpshop'), 'http://shop.eoxia.com/boutique/shop/modules-wpshop/modules-de-livraison/'); ?></div> |
|
| 1 | +<?php if (!defined('ABSPATH')) exit; |
|
| 2 | + if (!empty($shipping_mode_option) && !empty($shipping_mode_option['modes'])) : ?> |
|
| 3 | +<div class="wps-alert-error" id="wps_shipping_config_save_message" style="display : none"><span class="dashicons dashicons-info"></span> <?php _e('Process saving, please wait...', 'wpshop'); ?></div> |
|
| 4 | +<div class="wps-alert-info"><span class="dashicons dashicons-lightbulb"></span> <?php printf(__('Offer a new shipping service to your customer with <a href="%s" target="_blank">So Colissimo or another shipping mode</a>', 'wpshop'), 'http://shop.eoxia.com/boutique/shop/modules-wpshop/modules-de-livraison/'); ?></div> |
|
| 5 | 5 | <div class="wps-table" id="wps_shipping_mode_list_container"> |
| 6 | 6 | <div class="wps-table-header wps-table-row" > |
| 7 | 7 | <div class="wps-table-cell"></div> |
| 8 | - <div class="wps-table-cell"><?php _e( 'Logo', 'wpshop'); ?></div> |
|
| 9 | - <div class="wps-table-cell"><?php _e( 'Shipping mode Name', 'wpshop'); ?></div> |
|
| 10 | - <div class="wps-table-cell"><?php _e( 'Configure', 'wpshop'); ?></div> |
|
| 11 | - <div class="wps-table-cell"><?php _e( 'Activate', 'wpshop'); ?></div> |
|
| 12 | - <div class="wps-table-cell"><?php _e( 'Default shipping mode', 'wpshop'); ?></div> |
|
| 13 | - <div class="wps-table-cell"><?php _e( 'Delete', 'wpshop'); ?></div> |
|
| 8 | + <div class="wps-table-cell"><?php _e('Logo', 'wpshop'); ?></div> |
|
| 9 | + <div class="wps-table-cell"><?php _e('Shipping mode Name', 'wpshop'); ?></div> |
|
| 10 | + <div class="wps-table-cell"><?php _e('Configure', 'wpshop'); ?></div> |
|
| 11 | + <div class="wps-table-cell"><?php _e('Activate', 'wpshop'); ?></div> |
|
| 12 | + <div class="wps-table-cell"><?php _e('Default shipping mode', 'wpshop'); ?></div> |
|
| 13 | + <div class="wps-table-cell"><?php _e('Delete', 'wpshop'); ?></div> |
|
| 14 | 14 | </div> |
| 15 | - <?php foreach( $shipping_mode_option['modes'] as $k => $shipping_mode ) : |
|
| 16 | - if( $k != 'default_choice' ) : |
|
| 17 | - require( wpshop_tools::get_template_part( WPS_SHIPPING_MODE_DIR, $this->template_dir, "backend", "shipping-mode") ); |
|
| 15 | + <?php foreach ($shipping_mode_option['modes'] as $k => $shipping_mode) : |
|
| 16 | + if ($k != 'default_choice') : |
|
| 17 | + require(wpshop_tools::get_template_part(WPS_SHIPPING_MODE_DIR, $this->template_dir, "backend", "shipping-mode")); |
|
| 18 | 18 | endif; |
| 19 | 19 | endforeach; ?> |
| 20 | 20 | </div> |
| 21 | -<div><a data-nonce="<?php echo wp_create_nonce( 'wps_add_new_shipping_mode' ); ?>" class="wps-bton-mini-rounded-fourth wps_create_new_shipping_mode"><i class="wps-icon-pencil"></i> <?php _e( 'Add a new shipping mode', 'wpshop'); ?></a></div> |
|
| 21 | +<div><a data-nonce="<?php echo wp_create_nonce('wps_add_new_shipping_mode'); ?>" class="wps-bton-mini-rounded-fourth wps_create_new_shipping_mode"><i class="wps-icon-pencil"></i> <?php _e('Add a new shipping mode', 'wpshop'); ?></a></div> |
|
| 22 | 22 | <?php else : ?> |
| 23 | - <div class="wps-alert-info"><?php _e( 'No shipping mode available', 'wpshop'); ?></div> |
|
| 23 | + <div class="wps-alert-info"><?php _e('No shipping mode available', 'wpshop'); ?></div> |
|
| 24 | 24 | <?php endif; ?> |
@@ -1,8 +1,8 @@ discard block |
||
| 1 | -<?php if ( !defined( 'ABSPATH' ) ) exit; |
|
| 1 | +<?php if (!defined('ABSPATH')) exit; |
|
| 2 | 2 | |
| 3 | 3 | /* Check if file is include. No direct access possible with file url */ |
| 4 | -if ( !defined( 'WPSHOP_VERSION' ) ) { |
|
| 5 | - die( __('Access is not allowed by this way', 'wpshop') ); |
|
| 4 | +if (!defined('WPSHOP_VERSION')) { |
|
| 5 | + die(__('Access is not allowed by this way', 'wpshop')); |
|
| 6 | 6 | } |
| 7 | 7 | |
| 8 | 8 | /** |
@@ -25,13 +25,13 @@ discard block |
||
| 25 | 25 | /** |
| 26 | 26 | * |
| 27 | 27 | */ |
| 28 | - public static function declare_options(){ |
|
| 29 | - $page = !empty( $_GET['page'] ) ? sanitize_text_field( $_GET['page'] ) : ''; |
|
| 28 | + public static function declare_options() { |
|
| 29 | + $page = !empty($_GET['page']) ? sanitize_text_field($_GET['page']) : ''; |
|
| 30 | 30 | |
| 31 | - if ( isset($page) && ( substr($page, 0, 13 ) == 'wpshop_option' || $page == 'wps-installer' ) ) { |
|
| 31 | + if (isset($page) && (substr($page, 0, 13) == 'wpshop_option' || $page == 'wps-installer')) { |
|
| 32 | 32 | wp_enqueue_media(); |
| 33 | 33 | } |
| 34 | - add_settings_section('wpshop_general_config','<span class="dashicons dashicons-info"></span>'. __('Shop main configuration', 'wpshop'), array('wpshop_general_options', 'plugin_section_text'), 'wpshop_general_config'); |
|
| 34 | + add_settings_section('wpshop_general_config', '<span class="dashicons dashicons-info"></span>' . __('Shop main configuration', 'wpshop'), array('wpshop_general_options', 'plugin_section_text'), 'wpshop_general_config'); |
|
| 35 | 35 | |
| 36 | 36 | register_setting('wpshop_options', 'wpshop_shop_type', array('wpshop_general_options', 'wpshop_options_validate_wpshop_shop_type')); |
| 37 | 37 | add_settings_field('wpshop_shop_type', __('Shop type', 'wpshop'), array('wpshop_general_options', 'wpshop_shop_type'), 'wpshop_general_config', 'wpshop_general_config'); |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | |
| 61 | 61 | /* Default currecy for the entire shop */ |
| 62 | 62 | public static function wpshop_shop_default_currency_field() { |
| 63 | - echo wpshop_attributes_unit::wpshop_shop_currency_list_field() . '<a href="#" title="'.__('This is the currency the shop will use','wpshop').'" class="wpshop_infobulle_marker">?</a>'; |
|
| 63 | + echo wpshop_attributes_unit::wpshop_shop_currency_list_field() . '<a href="#" title="' . __('This is the currency the shop will use', 'wpshop') . '" class="wpshop_infobulle_marker">?</a>'; |
|
| 64 | 64 | } |
| 65 | 65 | |
| 66 | 66 | public static function wpshop_default_weight_unity_field() { |
@@ -70,16 +70,16 @@ discard block |
||
| 70 | 70 | $current_weight = get_option('wpshop_shop_default_weight_unity'); |
| 71 | 71 | |
| 72 | 72 | $weight_options = ''; |
| 73 | - if ( !empty ($weight_group) ) { |
|
| 74 | - $query = $wpdb->prepare('SELECT * FROM ' .WPSHOP_DBT_ATTRIBUTE_UNIT. ' WHERE group_id = %d', $weight_group); |
|
| 73 | + if (!empty ($weight_group)) { |
|
| 74 | + $query = $wpdb->prepare('SELECT * FROM ' . WPSHOP_DBT_ATTRIBUTE_UNIT . ' WHERE group_id = %d', $weight_group); |
|
| 75 | 75 | $weight_units = $wpdb->get_results($query); |
| 76 | - foreach ( $weight_units as $weight_unit) { |
|
| 77 | - $weight_options .= '<option value="'.$weight_unit->id.'"'.( ($weight_unit->id == $current_weight) ? ' selected="selected"' : null).'>'.$weight_unit->name.' ('.$weight_unit->unit.')</option>'; |
|
| 76 | + foreach ($weight_units as $weight_unit) { |
|
| 77 | + $weight_options .= '<option value="' . $weight_unit->id . '"' . (($weight_unit->id == $current_weight) ? ' selected="selected"' : null) . '>' . $weight_unit->name . ' (' . $weight_unit->unit . ')</option>'; |
|
| 78 | 78 | } |
| 79 | 79 | } |
| 80 | 80 | |
| 81 | - echo '<select name="wpshop_shop_default_weight_unity">'.$weight_options.'</select> |
|
| 82 | - <a href="#" title="'.__('This is the weight unity the shop will use','wpshop').'" class="wpshop_infobulle_marker">?</a>'; |
|
| 81 | + echo '<select name="wpshop_shop_default_weight_unity">' . $weight_options . '</select> |
|
| 82 | + <a href="#" title="'.__('This is the weight unity the shop will use', 'wpshop') . '" class="wpshop_infobulle_marker">?</a>'; |
|
| 83 | 83 | } |
| 84 | 84 | |
| 85 | 85 | public static function wpshop_options_validate_default_currency($input) { |
@@ -94,30 +94,30 @@ discard block |
||
| 94 | 94 | $current_piloting = get_option('wpshop_shop_price_piloting', WPSHOP_PRODUCT_PRICE_PILOT); |
| 95 | 95 | |
| 96 | 96 | $piloting_options = ''; |
| 97 | - foreach(self::$wpshop_price_piloting_types as $price_type) { |
|
| 98 | - $piloting_options .= '<option value="'.$price_type.'"'.(($price_type==$current_piloting) ? ' selected="selected"' : null).'>'.$price_type.'</option>'; |
|
| 97 | + foreach (self::$wpshop_price_piloting_types as $price_type) { |
|
| 98 | + $piloting_options .= '<option value="' . $price_type . '"' . (($price_type == $current_piloting) ? ' selected="selected"' : null) . '>' . $price_type . '</option>'; |
|
| 99 | 99 | } |
| 100 | - echo '<select name="wpshop_shop_price_piloting">'.$piloting_options.'</select> |
|
| 101 | - <a href="#" title=\''. __('You can choose if the price you will enter in each product is the "all tax include" price or the "tax free price"','wpshop') .'\' class="wpshop_infobulle_marker">?</a>'; |
|
| 100 | + echo '<select name="wpshop_shop_price_piloting">' . $piloting_options . '</select> |
|
| 101 | + <a href="#" title=\''. __('You can choose if the price you will enter in each product is the "all tax include" price or the "tax free price"', 'wpshop') . '\' class="wpshop_infobulle_marker">?</a>'; |
|
| 102 | 102 | } |
| 103 | 103 | |
| 104 | 104 | |
| 105 | 105 | public static function wpshop_ga_account_id_field() { |
| 106 | 106 | $ga_account_id = get_option('wpshop_ga_account_id'); |
| 107 | - echo '<input type="text" name="wpshop_ga_account_id" value="'.$ga_account_id.'" />'; |
|
| 107 | + echo '<input type="text" name="wpshop_ga_account_id" value="' . $ga_account_id . '" />'; |
|
| 108 | 108 | } |
| 109 | 109 | |
| 110 | - public static function wpshop_options_validate_ga_account_id ($input) { |
|
| 110 | + public static function wpshop_options_validate_ga_account_id($input) { |
|
| 111 | 111 | return $input; |
| 112 | 112 | } |
| 113 | 113 | |
| 114 | - public static function wpshop_options_validate_default_weight_unity ($input) { |
|
| 114 | + public static function wpshop_options_validate_default_weight_unity($input) { |
|
| 115 | 115 | return $input; |
| 116 | 116 | } |
| 117 | 117 | public static function wpshop_options_validate_price_piloting($input) { |
| 118 | 118 | global $wpdb; |
| 119 | 119 | |
| 120 | - $price_pilot_attribute_code = constant('WPSHOP_PRODUCT_PRICE_'.$input); |
|
| 120 | + $price_pilot_attribute_code = constant('WPSHOP_PRODUCT_PRICE_' . $input); |
|
| 121 | 121 | |
| 122 | 122 | $query = $wpdb->prepare( |
| 123 | 123 | "SELECT ATTRIBUTE.code, ATTR_SET_SECTION_DETAILS.id, ATTR_SET_SECTION_DETAILS.attribute_group_id, ATTR_SET_SECTION_DETAILS.position |
@@ -134,23 +134,23 @@ discard block |
||
| 134 | 134 | |
| 135 | 135 | $new_def = array(); |
| 136 | 136 | foreach ($attributes_order as $attribute_group_id => $attribute_price_def) : |
| 137 | - if ( ($price_pilot_attribute_code == WPSHOP_PRODUCT_PRICE_TTC) && (!empty($attribute_price_def[WPSHOP_PRODUCT_PRICE_TTC]['position']) && !empty($attribute_price_def[WPSHOP_PRODUCT_PRICE_HT]['position'])) && ($attribute_price_def[WPSHOP_PRODUCT_PRICE_TTC]['position'] > $attribute_price_def[WPSHOP_PRODUCT_PRICE_HT]['position']) ) { |
|
| 137 | + if (($price_pilot_attribute_code == WPSHOP_PRODUCT_PRICE_TTC) && (!empty($attribute_price_def[WPSHOP_PRODUCT_PRICE_TTC]['position']) && !empty($attribute_price_def[WPSHOP_PRODUCT_PRICE_HT]['position'])) && ($attribute_price_def[WPSHOP_PRODUCT_PRICE_TTC]['position'] > $attribute_price_def[WPSHOP_PRODUCT_PRICE_HT]['position'])) { |
|
| 138 | 138 | $wpdb->update(WPSHOP_DBT_ATTRIBUTE_DETAILS, array('last_update_date' => current_time('mysql', 0), 'position' => $attribute_price_def[WPSHOP_PRODUCT_PRICE_TTC]['position']), array('id' => $attribute_price_def[WPSHOP_PRODUCT_PRICE_HT]['id'])); |
| 139 | 139 | $wpdb->update(WPSHOP_DBT_ATTRIBUTE_DETAILS, array('last_update_date' => current_time('mysql', 0), 'position' => $attribute_price_def[WPSHOP_PRODUCT_PRICE_HT]['position']), array('id' => $attribute_price_def[WPSHOP_PRODUCT_PRICE_TTC]['id'])); |
| 140 | 140 | |
| 141 | 141 | /** Update entries for quick add and variations */ |
| 142 | - $wpdb->query('UPDATE ' .WPSHOP_DBT_ATTRIBUTE.' SET is_used_in_quick_add_form = "yes", is_used_in_variation = "yes" WHERE code = "product_price"'); |
|
| 143 | - $wpdb->query('UPDATE ' .WPSHOP_DBT_ATTRIBUTE.' SET is_used_in_quick_add_form = "yes" WHERE code = "tx_tva"'); |
|
| 144 | - $wpdb->query('UPDATE ' .WPSHOP_DBT_ATTRIBUTE.' SET is_used_in_quick_add_form = "no", is_used_in_variation = "no" WHERE code = "price_ht"'); |
|
| 142 | + $wpdb->query('UPDATE ' . WPSHOP_DBT_ATTRIBUTE . ' SET is_used_in_quick_add_form = "yes", is_used_in_variation = "yes" WHERE code = "product_price"'); |
|
| 143 | + $wpdb->query('UPDATE ' . WPSHOP_DBT_ATTRIBUTE . ' SET is_used_in_quick_add_form = "yes" WHERE code = "tx_tva"'); |
|
| 144 | + $wpdb->query('UPDATE ' . WPSHOP_DBT_ATTRIBUTE . ' SET is_used_in_quick_add_form = "no", is_used_in_variation = "no" WHERE code = "price_ht"'); |
|
| 145 | 145 | } |
| 146 | - elseif ( ($price_pilot_attribute_code == WPSHOP_PRODUCT_PRICE_HT) && (!empty($attribute_price_def[WPSHOP_PRODUCT_PRICE_HT]['position']) && !empty($attribute_price_def[WPSHOP_PRODUCT_PRICE_TTC]['position'])) && ($attribute_price_def[WPSHOP_PRODUCT_PRICE_HT]['position'] > $attribute_price_def[WPSHOP_PRODUCT_PRICE_TTC]['position']) ) { |
|
| 146 | + elseif (($price_pilot_attribute_code == WPSHOP_PRODUCT_PRICE_HT) && (!empty($attribute_price_def[WPSHOP_PRODUCT_PRICE_HT]['position']) && !empty($attribute_price_def[WPSHOP_PRODUCT_PRICE_TTC]['position'])) && ($attribute_price_def[WPSHOP_PRODUCT_PRICE_HT]['position'] > $attribute_price_def[WPSHOP_PRODUCT_PRICE_TTC]['position'])) { |
|
| 147 | 147 | $wpdb->update(WPSHOP_DBT_ATTRIBUTE_DETAILS, array('last_update_date' => current_time('mysql', 0), 'position' => $attribute_price_def[WPSHOP_PRODUCT_PRICE_TTC]['position']), array('id' => $attribute_price_def[WPSHOP_PRODUCT_PRICE_HT]['id'])); |
| 148 | 148 | $wpdb->update(WPSHOP_DBT_ATTRIBUTE_DETAILS, array('last_update_date' => current_time('mysql', 0), 'position' => $attribute_price_def[WPSHOP_PRODUCT_PRICE_HT]['position']), array('id' => $attribute_price_def[WPSHOP_PRODUCT_PRICE_TTC]['id'])); |
| 149 | 149 | |
| 150 | 150 | /** Update entries for quick add and variations */ |
| 151 | - $wpdb->query('UPDATE ' .WPSHOP_DBT_ATTRIBUTE.' SET is_used_in_quick_add_form = "yes", is_used_in_variation = "yes" WHERE code = "price_ht"'); |
|
| 152 | - $wpdb->query('UPDATE ' .WPSHOP_DBT_ATTRIBUTE.' SET is_used_in_quick_add_form = "no" WHERE code = "tx_tva"'); |
|
| 153 | - $wpdb->query('UPDATE ' .WPSHOP_DBT_ATTRIBUTE.' SET is_used_in_quick_add_form = "no", is_used_in_variation = "no" WHERE code = "product_price"'); |
|
| 151 | + $wpdb->query('UPDATE ' . WPSHOP_DBT_ATTRIBUTE . ' SET is_used_in_quick_add_form = "yes", is_used_in_variation = "yes" WHERE code = "price_ht"'); |
|
| 152 | + $wpdb->query('UPDATE ' . WPSHOP_DBT_ATTRIBUTE . ' SET is_used_in_quick_add_form = "no" WHERE code = "tx_tva"'); |
|
| 153 | + $wpdb->query('UPDATE ' . WPSHOP_DBT_ATTRIBUTE . ' SET is_used_in_quick_add_form = "no", is_used_in_variation = "no" WHERE code = "product_price"'); |
|
| 154 | 154 | } |
| 155 | 155 | endforeach; |
| 156 | 156 | |
@@ -161,37 +161,37 @@ discard block |
||
| 161 | 161 | public static function wpshop_shop_type() { |
| 162 | 162 | $shop_types = unserialize(WPSHOP_SHOP_TYPES); |
| 163 | 163 | $shop_types_options = ''; |
| 164 | - foreach($shop_types as $type) { |
|
| 165 | - $shop_types_options .= '<option value="'.$type.'"'.(($type==WPSHOP_DEFINED_SHOP_TYPE) ? ' selected="selected"' : null).'>'.__($type, 'wpshop').'</option>'; |
|
| 164 | + foreach ($shop_types as $type) { |
|
| 165 | + $shop_types_options .= '<option value="' . $type . '"' . (($type == WPSHOP_DEFINED_SHOP_TYPE) ? ' selected="selected"' : null) . '>' . __($type, 'wpshop') . '</option>'; |
|
| 166 | 166 | } |
| 167 | - echo '<select name="wpshop_shop_type">'.$shop_types_options.'</select><input type="hidden" name="old_wpshop_shop_type" value="'.WPSHOP_DEFINED_SHOP_TYPE.'" /> |
|
| 168 | - <a href="#" title="'.__('Define if you have a shop to sale item or just for item showing','wpshop').'" class="wpshop_infobulle_marker">?</a>'; |
|
| 167 | + echo '<select name="wpshop_shop_type">' . $shop_types_options . '</select><input type="hidden" name="old_wpshop_shop_type" value="' . WPSHOP_DEFINED_SHOP_TYPE . '" /> |
|
| 168 | + <a href="#" title="'.__('Define if you have a shop to sale item or just for item showing', 'wpshop') . '" class="wpshop_infobulle_marker">?</a>'; |
|
| 169 | 169 | } |
| 170 | 170 | |
| 171 | - public static function wpshop_logo_field () { |
|
| 171 | + public static function wpshop_logo_field() { |
|
| 172 | 172 | $logo_option = get_option('wpshop_logo'); |
| 173 | 173 | |
| 174 | - $output = '<a href="#" id="wps-add-logo-picture" class="wps-bton-first-mini-rounded">' .__( 'Upload your logo', 'wpshop' ). '</a><br/>'; |
|
| 175 | - $output .= '<img id="wpshop_logo_thumbnail" src="' .( ( !empty($logo_option) ) ? $logo_option : WPSHOP_DEFAULT_CATEGORY_PICTURE ). '" alt="Logo" style="height : 40px; width : auto; border : 5px solid #E8E8E8; margin-top : 8px;" />'; |
|
| 176 | - $output .= '<input type="hidden" name="wpshop_logo" id="wpshop_logo_field" value="' .$logo_option. '" />'; |
|
| 177 | - $output .= '<br/><a href="#" id="wps-delete-shop-logo" '.( empty($logo_option) ? 'class="wpshopHide"' : '' ) .'>' . __( 'Delete this logo', 'wpshop' ) . '</a>'; |
|
| 174 | + $output = '<a href="#" id="wps-add-logo-picture" class="wps-bton-first-mini-rounded">' . __('Upload your logo', 'wpshop') . '</a><br/>'; |
|
| 175 | + $output .= '<img id="wpshop_logo_thumbnail" src="' . ((!empty($logo_option)) ? $logo_option : WPSHOP_DEFAULT_CATEGORY_PICTURE) . '" alt="Logo" style="height : 40px; width : auto; border : 5px solid #E8E8E8; margin-top : 8px;" />'; |
|
| 176 | + $output .= '<input type="hidden" name="wpshop_logo" id="wpshop_logo_field" value="' . $logo_option . '" />'; |
|
| 177 | + $output .= '<br/><a href="#" id="wps-delete-shop-logo" ' . (empty($logo_option) ? 'class="wpshopHide"' : '') . '>' . __('Delete this logo', 'wpshop') . '</a>'; |
|
| 178 | 178 | |
| 179 | 179 | echo $output; |
| 180 | 180 | } |
| 181 | 181 | |
| 182 | - public static function wpshop_options_validate_logo ($input) { |
|
| 182 | + public static function wpshop_options_validate_logo($input) { |
|
| 183 | 183 | return $input; |
| 184 | 184 | } |
| 185 | 185 | |
| 186 | 186 | public static function wpshop_options_validate_wpshop_shop_type($input) { |
| 187 | 187 | global $current_db_version; |
| 188 | 188 | |
| 189 | - $current_installation_step = get_option( 'wps-installation-current-step', 1 ); |
|
| 190 | - if ( WPSINSTALLER_STEPS_COUNT <= $current_installation_step || ( !empty( $current_db_version ) && !empty( $current_db_version[ 'db_version' ] ) && ( 51 < $current_db_version[ 'db_version' ] ) ) ) { |
|
| 189 | + $current_installation_step = get_option('wps-installation-current-step', 1); |
|
| 190 | + if (WPSINSTALLER_STEPS_COUNT <= $current_installation_step || (!empty($current_db_version) && !empty($current_db_version['db_version']) && (51 < $current_db_version['db_version']))) { |
|
| 191 | 191 | $current_db_version['installation_state'] = 'completed'; |
| 192 | 192 | update_option('wpshop_db_options', $current_db_version); |
| 193 | - if ( $input == 'sale' ) { |
|
| 194 | - wpshop_install::wpshop_insert_default_pages( $input ); |
|
| 193 | + if ($input == 'sale') { |
|
| 194 | + wpshop_install::wpshop_insert_default_pages($input); |
|
| 195 | 195 | } |
| 196 | 196 | } |
| 197 | 197 | return $input; |