PluginProbe
ShopBuilder – WooCommerce Builder For Elementor / 2.0.2
ShopBuilder – WooCommerce Builder For Elementor v2.0.2
3.4.2 3.4.1 3.4.0 2.0.1 2.0.2 2.0.3 2.1.0 2.1.1 2.1.10 2.1.11 2.1.12 2.1.13 2.1.14 2.1.15 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.1.9 2.2.0 2.2.1 2.2.2 All 63 releases
← All changes | app/Controllers/Admin/Ajax/CreateTemplate.php +3 -7 2.1.12.0.2 View file →
@@ -6,9 +6,8 @@
6 6 use Elementor\Plugin;
7 7 use Elementor\TemplateLibrary\Source_Base;
8 8 use RadiusTheme\SB\Helpers\BuilderFns;
9 9 use RadiusTheme\SB\Helpers\Fns;
10 -use RadiusTheme\SB\Models\TemplateSettings;
11 10 use RadiusTheme\SB\Traits\SingletonTrait;
12 11
13 12 // Do not allow directly accessing this file.
14 13 if ( ! defined( 'ABSPATH' ) ) {
@@ -147,16 +146,13 @@
147 146 $category_archive = array_unique( isset( $_POST['category_archive'] ) && is_array( $_POST['category_archive'] ) ? array_map( 'sanitize_text_field', $_POST['category_archive'] ) : [] );
148 147 $the_products = array_unique( isset( $_POST['the_products'] ) && is_array( $_POST['the_products'] ) ? array_map( 'absint', $_POST['the_products'] ) : [] );
149 148 if ( ! count( $the_products ) && ! count( $category_archive ) ) {
150 149 if ( 'default_template' === $default_template ) {
151 - // update_option( $option_name, $page_id );
152 - TemplateSettings::instance()->set_option( $option_name, $page_id );
150 + update_option( $option_name, $page_id );
153 151 } else {
154 - // $has_default = get_option( $option_name );
155 - $has_default = TemplateSettings::instance()->get_option( $option_name );
152 + $has_default = get_option( $option_name );
156 153 if ( ! $has_default ) {
157 - // update_option( $option_name, '' );
158 - TemplateSettings::instance()->set_option( $option_name, '' );
154 + update_option( $option_name, '' );
159 155 }
160 156 }
161 157 }
162 158