Plugin Directory

Changeset 3071491


Ignore:
Timestamp:
04/16/2024 10:24:20 AM (2 years ago)
Author:
camoo
Message:

Bug fix

File:
1 edited

Legend:

Unmodified
Added
Removed
  • camoo-cdn/tags/2.0.2/src/Services/QueryCaching.php

    r3070070 r3071491  
    7171    private static function shouldCache(): bool
    7272    {
    73         if (is_user_logged_in() || WC()->cart->get_cart_contents_count() > 0) {
     73        if (is_user_logged_in() || (function_exists('WC') && WC()->cart->get_cart_contents_count() > 0)) {
    7474            self::logDebug("Don't cache loggedin user or non empty Woocommerce cart");
    7575
Note: See TracChangeset for help on using the changeset viewer.