PluginProbe
ShopBuilder – WooCommerce Builder For Elementor / 3.2.6
ShopBuilder – WooCommerce Builder For Elementor v3.2.6
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/Helpers/Installation.php +16 -7 2.2.03.2.6 View file →
@@ -90,11 +90,25 @@
90 90 * @return void
91 91 */
92 92 public static function deactivation() {
93 93 delete_option( 'shopbuilder_permalinks_flushed' );
94 + self::clear_scheduled_events();
94 95 }
95 -
96 96 /**
97 + * Clear Scheduled Events
98 + *
99 + * @return void
100 + */
101 + public static function clear_scheduled_events() {
102 + $schedule = get_option( 'rtsb_cron_schedule_free', [] );
103 + if ( empty( $schedule ) ) {
104 + return;
105 + }
106 + foreach ( $schedule as $v ) {
107 + wp_clear_scheduled_hook( $v );
108 + }
109 + }
110 + /**
97 111 * Set default options.
98 112 *
99 113 * @return void
100 114 */
@@ -126,9 +140,8 @@
126 140 *
127 141 * @return int
128 142 */
129 143 public static function create_wc_product() {
130 -
131 144 $product = new WC_Product_Simple();
132 145 $product->set_name( 'Confirm at least one product is created before deleting' );
133 146 $product->set_description( 'This is a ShopBuilder demo preview product' );
134 147 $product->set_short_description( 'This is a ShopBuilder product' );
@@ -137,12 +150,8 @@
137 150 $product->set_regular_price( 50 );
138 151 $product->set_sale_price( 49 );
139 152 $product->set_price( 49 );
140 153
141 - $product->set_sku( 'SAMPLE-001' );
142 -
143 - $product->set_manage_stock( false );
144 - $product->set_stock_status( 'instock' );
145 -
154 + $product->set_sku( '' );
146 155 return $product->save();
147 156 }
148 157 }