PluginProbe
SellKit – Funnel builder and checkout optimizer for WooCommerce to sell more, faster / 2.8.0
SellKit – Funnel builder and checkout optimizer for WooCommerce to sell more, faster v2.8.0
2.8.0 2.7.0 2.6.0 trunk 1.1.0 1.1.4 1.2.1 1.2.2 1.2.3 1.2.5 1.2.9 1.3.1 1.3.2 1.5.0 1.5.1 1.5.4 1.5.7 1.5.8 1.5.9 1.6.2 1.6.5 1.6.8 1.7.2 1.7.4 1.7.5 All 44 releases
← All changes | includes/admin/funnel/class.php +10 -5 1.1.0 → 2.8.0 View file →
@@ -18,16 +18,17 @@
18 18 *
19 19 * @since 1.1.0
20 20 */
21 21 public function __construct() {
22 - if ( ! class_exists( 'Elementor\Plugin' ) ) {
23 - return false;
22 + if ( class_exists( 'Elementor\Plugin' ) ) {
23 + sellkit()->load_files( [
24 + 'admin/funnel/importer/page-builders/elementor-importer',
25 + ] );
24 26 }
25 27
26 28 sellkit()->load_files(
27 29 [
28 30 'admin/funnel/importer/page-builders/importer-base',
29 - 'admin/funnel/importer/page-builders/elementor-importer',
30 31 'admin/funnel/importer/step-importer',
31 32 'admin/funnel/importer/ajax-handler',
32 33 ]
33 34 );
@@ -44,12 +45,16 @@
44 45 check_ajax_referer( 'sellkit', 'nonce' );
45 46
46 47 $product_id = filter_input( INPUT_GET, 'product_id', FILTER_SANITIZE_NUMBER_INT );
47 48
49 + if ( ! sellkit()->has_valid_dependencies() ) {
50 + wp_send_json_error( __( 'Please install and activate WooCommerce.', 'sellkit' ) );
51 + }
52 +
48 53 $product = wc_get_product( $product_id );
49 54
50 - if ( empty( $product_id ) ) {
51 - wp_send_json_error( __( 'Please send product id', 'sellkit' ) );
55 + if ( empty( $product ) ) {
56 + wp_send_json_error( __( 'Product does not exist', 'sellkit' ) );
52 57 }
53 58
54 59 wp_send_json_success( [
55 60 'thumbnail' => get_the_post_thumbnail_url( $product_id ),