Starter Templates by Kadence WP - Version 1.2.16

Version Description

  • Fix: Issue with woocommerce page styles.
Download this release

Release Info

Developer britner
Plugin Icon 128x128 Starter Templates by Kadence WP
Version 1.2.16
Comparing to
See all releases

Code changes from version 1.2.15 to 1.2.16

class-kadence-starter-templates.php CHANGED
@@ -105,6 +105,13 @@ class Starter_Templates {
105
  */
106
  private $override_fonts;
107
 
 
 
 
 
 
 
 
108
  /**
109
  * The paths of the actual import files to be used in the import.
110
  *
@@ -189,7 +196,7 @@ class Starter_Templates {
189
  define( 'KADENCE_STARTER_TEMPLATES_URL', trailingslashit( plugin_dir_url( __FILE__ ) ) );
190
  }
191
  if ( ! defined( 'KADENCE_STARTER_TEMPLATES_VERSION' ) ) {
192
- define( 'KADENCE_STARTER_TEMPLATES_VERSION', '1.2.15' );
193
  }
194
  }
195
 
@@ -1393,6 +1400,9 @@ class Starter_Templates {
1393
  if ( 'woocommerce' === $base && empty( get_option( 'woocommerce_db_version' ) ) ) {
1394
  update_option( 'woocommerce_db_version', '4.0' );
1395
  }
 
 
 
1396
  if ( 'unknown' === $src ) {
1397
  $check_api = plugins_api(
1398
  'plugin_information',
@@ -2068,9 +2078,9 @@ class Starter_Templates {
2068
  wp_send_json( esc_html__( 'No import files specified!', 'kadence-starter-templates' ) );
2069
  }
2070
  }
2071
- if ( class_exists( 'woocommerce' ) && isset( $this->import_files[ $this->selected_index ]['ecommerce'] ) && $this->import_files[ $this->selected_index ]['ecommerce'] ) {
2072
- add_filter( 'stop_importing_woo_pages', '__return_true' );
2073
- }
2074
  // If elementor make sure the defaults are off.
2075
  if ( isset( $this->import_files[ $this->selected_index ]['type'] ) && 'elementor' === $this->import_files[ $this->selected_index ]['type'] ) {
2076
  update_option( 'elementor_disable_color_schemes', 'yes' );
@@ -2105,6 +2115,20 @@ class Starter_Templates {
2105
  wp_delete_post( $sample_page->ID, true ); // Sample Page.
2106
  }
2107
  wp_delete_comment( 1, true ); // WordPress comment.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2108
  // Move All active widgets into inactive.
2109
  $sidebars = wp_get_sidebars_widgets();
2110
  if ( is_array( $sidebars ) ) {
105
  */
106
  private $override_fonts;
107
 
108
+ /**
109
+ * Import Shop/Cart/Checkout Pages.
110
+ *
111
+ * @var boolean
112
+ */
113
+ private $ss = false;
114
+
115
  /**
116
  * The paths of the actual import files to be used in the import.
117
  *
196
  define( 'KADENCE_STARTER_TEMPLATES_URL', trailingslashit( plugin_dir_url( __FILE__ ) ) );
197
  }
198
  if ( ! defined( 'KADENCE_STARTER_TEMPLATES_VERSION' ) ) {
199
+ define( 'KADENCE_STARTER_TEMPLATES_VERSION', '1.2.16' );
200
  }
201
  }
202
 
1400
  if ( 'woocommerce' === $base && empty( get_option( 'woocommerce_db_version' ) ) ) {
1401
  update_option( 'woocommerce_db_version', '4.0' );
1402
  }
1403
+ if ( 'woocommerce' === $base && ( 'notactive' === $state || 'installed' === $state ) ) {
1404
+ $this->ss = true;
1405
+ }
1406
  if ( 'unknown' === $src ) {
1407
  $check_api = plugins_api(
1408
  'plugin_information',
2078
  wp_send_json( esc_html__( 'No import files specified!', 'kadence-starter-templates' ) );
2079
  }
2080
  }
2081
+ // if ( class_exists( 'woocommerce' ) && isset( $this->import_files[ $this->selected_index ]['ecommerce'] ) && $this->import_files[ $this->selected_index ]['ecommerce'] && ! $this->import_woo_pages ) {
2082
+ // add_filter( 'stop_importing_woo_pages', '__return_true' );
2083
+ // }
2084
  // If elementor make sure the defaults are off.
2085
  if ( isset( $this->import_files[ $this->selected_index ]['type'] ) && 'elementor' === $this->import_files[ $this->selected_index ]['type'] ) {
2086
  update_option( 'elementor_disable_color_schemes', 'yes' );
2115
  wp_delete_post( $sample_page->ID, true ); // Sample Page.
2116
  }
2117
  wp_delete_comment( 1, true ); // WordPress comment.
2118
+ /**
2119
+ * Clean up default woocommerce.
2120
+ */
2121
+ $woopages = array(
2122
+ 'woocommerce_shop_page_id' => 'shop',
2123
+ 'woocommerce_cart_page_id' => 'cart',
2124
+ 'woocommerce_checkout_page_id' => 'checkout',
2125
+ 'woocommerce_myaccount_page_id' => 'my-account',
2126
+ );
2127
+ foreach ( $woopages as $woo_page_option => $woo_page_slug ) {
2128
+ if ( get_option( $woo_page_option ) ) {
2129
+ wp_delete_post( get_option( $woo_page_option ), true );
2130
+ }
2131
+ }
2132
  // Move All active widgets into inactive.
2133
  $sidebars = wp_get_sidebars_widgets();
2134
  if ( is_array( $sidebars ) ) {
inc/class-importer.php CHANGED
@@ -181,7 +181,7 @@ class Importer {
181
  }
182
  } else {
183
  add_filter( 'wxr_importer.pre_process.post_meta', array( $this, 'process_elementor_images' ), 10, 2 );
184
- add_filter( 'wxr_importer.pre_process.post', array( $this, 'process_stop_woo_pages' ), 9, 4 );
185
  add_filter( 'wxr_importer.pre_process.post', array( $this, 'process_kadence_block_css' ), 10, 4 );
186
  //add_filter( 'wp_import_post_data_processed', array( $this, 'process_kadence_block_css_post' ), 10, 2 );
187
  add_filter( 'wxr_importer.pre_process.post', array( $this, 'process_internal_links' ), 11, 4 );
181
  }
182
  } else {
183
  add_filter( 'wxr_importer.pre_process.post_meta', array( $this, 'process_elementor_images' ), 10, 2 );
184
+ //add_filter( 'wxr_importer.pre_process.post', array( $this, 'process_stop_woo_pages' ), 9, 4 );
185
  add_filter( 'wxr_importer.pre_process.post', array( $this, 'process_kadence_block_css' ), 10, 4 );
186
  //add_filter( 'wp_import_post_data_processed', array( $this, 'process_kadence_block_css_post' ), 10, 2 );
187
  add_filter( 'wxr_importer.pre_process.post', array( $this, 'process_internal_links' ), 11, 4 );
kadence-starter-templates.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Plugin Name: Kadence Starter Templates
4
  * Description: Choose the prebuilt website and click to import.
5
- * Version: 1.2.15
6
  * Author: Kadence WP
7
  * Author URI: https://kadencewp.com/
8
  * License: GPLv2 or later
2
  /**
3
  * Plugin Name: Kadence Starter Templates
4
  * Description: Choose the prebuilt website and click to import.
5
+ * Version: 1.2.16
6
  * Author: Kadence WP
7
  * Author URI: https://kadencewp.com/
8
  * License: GPLv2 or later
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: britner
3
  Tags: templates, gutenberg
4
  Requires at least: 5.2
5
  Tested up to: 6.0
6
- Stable tag: 1.2.15
7
  Requires PHP: 7.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -108,6 +108,9 @@ Absolutely not.
108
 
109
  == Changelog ==
110
 
 
 
 
111
  = 1.2.15 =
112
  * Fix: Issue with single page imports.
113
  * Fix: Issue with importing without content.
3
  Tags: templates, gutenberg
4
  Requires at least: 5.2
5
  Tested up to: 6.0
6
+ Stable tag: 1.2.16
7
  Requires PHP: 7.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
108
 
109
  == Changelog ==
110
 
111
+ = 1.2.16 =
112
+ * Fix: Issue with woocommerce page styles.
113
+
114
  = 1.2.15 =
115
  * Fix: Issue with single page imports.
116
  * Fix: Issue with importing without content.