| @@ -3,9 +3,8 @@ | ||
| 3 | 3 | namespace RadiusTheme\SB\Controllers\Admin\Ajax; |
| 4 | 4 | |
| 5 | 5 | use RadiusTheme\SB\Helpers\BuilderFns; |
| 6 | 6 | use RadiusTheme\SB\Helpers\Fns; |
| 7 | -use RadiusTheme\SB\Models\TemplateSettings; | |
| 8 | 7 | use RadiusTheme\SB\Traits\SingletonTrait; |
| 9 | 8 | |
| 10 | 9 | // Do not allow directly accessing this file. |
| 11 | 10 | if ( ! defined( 'ABSPATH' ) ) { |
| @@ -45,16 +44,14 @@ | ||
| 45 | 44 | // For Specific Product |
| 46 | 45 | $the_option = BuilderFns::option_name_by_template_id( $page_id ); |
| 47 | 46 | $the_cat_option = BuilderFns::archive_option_name_by_template_id( $page_id ); |
| 48 | 47 | |
| 49 | - // $product_ids = get_option( $the_option ); | |
| 50 | - // $the_cats = get_option( $the_cat_option ); | |
| 51 | - $product_ids = TemplateSettings::instance()->get_option( $the_option ); | |
| 52 | - $the_cats = TemplateSettings::instance()->get_option( $the_cat_option ); | |
| 48 | + $product_ids = get_option( $the_option ); | |
| 49 | + $the_cats = get_option( $the_cat_option ); | |
| 50 | + | |
| 53 | 51 | if ( empty( $product_ids ) && empty( $the_cats ) ) { |
| 54 | 52 | $option_name = BuilderFns::option_name( $page_type ); |
| 55 | - //update_option( $option_name, $default_page_id ); | |
| 56 | - TemplateSettings::instance()->set_option( $option_name, $default_page_id ); | |
| 53 | + update_option( $option_name, $default_page_id ); | |
| 57 | 54 | } |
| 58 | 55 | |
| 59 | 56 | do_action( 'rtsb/set/builder/default/template', $_POST, $page_id ); |
| 60 | 57 | |