Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author kylereicks

    (@kylereicks)

    I am very sorry to hear that the plugin is not working as expected. I will dedicate some time this week to trying to duplicate the issue and report back.

    Thanks very much for the feedback.

    Plugin Author kylereicks

    (@kylereicks)

    Alright, I think I’ve got it. The plugin uses transient caching to avoid some unnecessary computation, but does flush that cache when a post or page is updated. In this case, the plugin isn’t able to tell that the cart has been updated because WooCommerce handles the cart inside a shortcode.

    We have a few options. We can disable the transient caching all together.

    In functions.php

    if(defined('PICTUREFILL_WP_VERSION')){
      disable_picturefill_wp_cache();
    }

    Disable transient caching on the cart shortcode.

    In functions.php

    if(defined('PICTUREFILL_WP_VERSION')){
      add_filter('the_content', 'do_not_cache_woocommerce_cart');
    }
    
    function do_not_cache_woocommerce_cart($content){
      if(has_shortcode($content, 'woocommerce_cart')){
        disable_picturefill_wp_cache();
      }
      return $content;
    }

    Or we can choose not to tell Picturefill.WP to ignore the shopping cart.

    In functions.php

    if(defined('PICTUREFILL_WP_VERSION')){
      picturefill_wp_exclude_post_slug('cart');
    }

    Please let me know if problems persist.

    Thanks very much

    Thread Starter maziarom

    (@maziarom)

    Thank you, that did the job!

    Plugin Author kylereicks

    (@kylereicks)

    Glad to hear it! Thanks for bringing the issue forward. I will be sure to reference this issue with Woocommerce in future documentation.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Crashes Woocommerce Shopping Cart!’ is closed to new replies.