Plugin Directory

Changeset 3298233


Ignore:
Timestamp:
05/21/2025 05:27:41 PM (10 months ago)
Author:
moinuddinmunna
Message:

Bug fix for Elementor templates

Location:
complete-mini-cart-for-woocommerce
Files:
35 added
3 edited

Legend:

Unmodified
Added
Removed
  • complete-mini-cart-for-woocommerce/trunk/complete-mini-cart-for-woocommerce.php

    r3279387 r3298233  
    55 * Plugin URI:        https://cmcw.mnddn.site/
    66 * Description:       This plugin adds a mini cart feature to your WooCommerce store. An Elementor Widget and a shortcode. All that you needed in one simple plugin.
    7  * Version:           2.0.3
     7 * Version:           2.0.4
    88 * Requires at least: 6.0
    99 * Requires PHP:      7.4
     
    5555    }
    5656
     57    /**
     58     * Define plugin constants
     59     */
     60    private function define_constants()
     61    {
     62        define('CMCW_PATH', plugin_dir_path(__FILE__));
     63        define('CMCW_URL', plugin_dir_url(__FILE__));
     64        define('CMCW_VERSION', '2.0.4');
     65    }
     66
    5767    public function cmcw_is_woocommerce_active()
    5868    {
     
    8696    }
    8797
    88     /**
    89      * Define plugin constants
    90      */
    91     private function define_constants()
    92     {
    93         define('CMCW_PATH', plugin_dir_path(__FILE__));
    94         define('CMCW_URL', plugin_dir_url(__FILE__));
    95         define('CMCW_VERSION', '2.0.3');
    96     }
     98
    9799
    98100    /**
  • complete-mini-cart-for-woocommerce/trunk/includes/shortcode/Shortcode.php

    r3279387 r3298233  
    8282            $icon_class = get_option('cmcw_icon_name') !== '' ? get_option('cmcw_icon_name') : 'fas fa-cart-plus';
    8383
    84             $cart_count = esc_html(WC()->cart->get_cart_contents_count());
     84            $cart_count = 0;
     85            if (function_exists('WC') && WC()->cart) {
     86                $cart_count = esc_html(WC()->cart->get_cart_contents_count());
     87            }
    8588
    8689            $shortcode_html = '<div class="cmcw-shortcode-container"><i class="' . esc_attr($icon_class) . '"></i>' . '<span class="cmcw-cart-count">'
     
    100103        if (!class_exists('WooCommerce') || !WC()->cart) {
    101104            wp_send_json_success(array('count' => 0));
     105            wp_die(); // Always die in functions echoing Ajax content
    102106        }
    103107
  • complete-mini-cart-for-woocommerce/trunk/readme.txt

    r3279387 r3298233  
    11=== Complete Mini Cart for WooCommerce ===
    22Contributors: moinuddinmunna
    3 Tags: Complete Mini Cart for WooCommerce, mini cart, woocommerce mini cart, ajax cart, woocommerce cart
     3Tags: complete Mini Cart for WooCommerce, mini cart, woocommerce mini cart, ajax cart, woocommerce cart
    44Requires at least: 6.0
    55Tested up to: 6.8
    66Requires PHP: 7.4
    7 Stable tag: 2.0.3
     7Stable tag: 2.0.4
    88Short Description: A powerful, lightweight, and fully customizable mini cart plugin to improve user experience with an AJAX-powered cart and real-time updates.
    99License: GPLv2 or later
Note: See TracChangeset for help on using the changeset viewer.