• Resolved cras6

    (@cras6)


    so it seems that your plugin is setting a cookie (see code below) that is causing it to bypass our cache setup. is there a way around this? why would this need to set a cookie to do this? as im sure you know – you are using the wp_woocommerce_session_ cookie that is used for the following (says woothemes doc) “contains a unique code for each customer so that it knows where to find the cart data in the database for each customer.” https://docs.woothemes.com/document/woocommerce-cookies/

    // Set cookie so PPP will be saved
    ???????? add_action( ‘init’, array( $this, ‘set_customer_session’ ), 10 );
    public function loop_shop_per_page() {

    ???????? if ( isset( $_REQUEST[‘wppp_ppp’] ) ) :
    ???????????? return intval( $_REQUEST[‘wppp_ppp’] );
    ???????? elseif ( isset( $_REQUEST[‘ppp’] ) ) :
    ???????????? return intval( $_REQUEST[‘ppp’] );
    ???????? elseif ( WC()->session->__isset( ‘products_per_page’ ) ) :
    ???????????? return intval( WC()->session->__get( ‘products_per_page’ ) );
    ???????? else :
    ???????????? return intval( get_option( ‘wppp_default_ppp’, ’12’ ) );
    ???????? endif;

    https://www.ads-software.com/plugins/woocommerce-products-per-page/

Viewing 1 replies (of 1 total)
  • Plugin Author Jeroen Sormani

    (@sormano)

    Hi,

    Sorry for the late reply, I never got a email notification about this topic! (seems to randomly happen to me for some topics)

    The session data from WC is saved in the options table (soon to be a separate one). This is used in the plugin to remember how many products the customer wants, for example when switching from categories the number of products on a page should still be the same.

    Can you elaborate your definition of ‘bypass our cahce’?

    Every customer should have some unique data (e.g. a cart), this is part of that ??

    Let me know ??

    Thanks,
    Jeroen Sormani

    (ps. feel free to mail me here if I don’t respond in ~24 hours, as I may not get a notification)

Viewing 1 replies (of 1 total)
  • The topic ‘cache issue’ is closed to new replies.