cache issue
-
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/
- The topic ‘cache issue’ is closed to new replies.