Skip to content

Commit

Permalink
v3.3.2-rc3: Better fix for woo product purge after order placed
Browse files Browse the repository at this point in the history
  • Loading branch information
hi-hai committed Aug 14, 2020
1 parent f7ae2de commit afad964
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
4 changes: 2 additions & 2 deletions litespeed-cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: LiteSpeed Cache
* Plugin URI: https://www.litespeedtech.com/products/cache-plugins/wordpress-acceleration
* Description: High-performance page caching and site optimization from LiteSpeed
* Version: 3.3.2-rc2
* Version: 3.3.2-rc3
* Author: LiteSpeed Technologies
* Author URI: https://www.litespeedtech.com
* License: GPLv3
Expand Down Expand Up @@ -33,7 +33,7 @@
return;
}

! defined( 'LSCWP_V' ) && define( 'LSCWP_V', '3.3.2-rc2' );
! defined( 'LSCWP_V' ) && define( 'LSCWP_V', '3.3.2-rc3' );

! defined( 'LSCWP_CONTENT_DIR' ) && define( 'LSCWP_CONTENT_DIR', WP_CONTENT_DIR ) ;
! defined( 'LSCWP_DIR' ) && define( 'LSCWP_DIR', __DIR__ . '/' ) ;// Full absolute path '/var/www/html/***/wp-content/plugins/litespeed-cache/' or MU
Expand Down
10 changes: 6 additions & 4 deletions src/conf.cls.php
Original file line number Diff line number Diff line change
Expand Up @@ -325,13 +325,15 @@ public function load_site_options()
*
* This will not be affected by network use primary site setting.
*
* NOTE: If it is a multi switch option, need to call `_conf_multi_switch()` first
*
* @since 3.0
* @access public
*/
public function option_append( $name, $default )
{
self::$_default_options[ $name ] = $default ;
$this->_options[ $name ] = self::get_option( $name, $default ) ;
public function option_append( $name, $default ) {
self::$_default_options[ $name ] = $default;
$this->_options[ $name ] = self::get_option( $name, $default );
$this->_options[ $name ] = $this->type_casting( $this->_options[ $name ], $name );
}

/**
Expand Down
11 changes: 5 additions & 6 deletions thirdparty/woocommerce.cls.php
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,7 @@ public function set_control($esi_id)
public function purge_product($product) {
do_action( 'litespeed_debug', '[3rd] Woo Purge [pid]' . $product->get_id() );

$config = (int) apply_filters( 'litespeed_conf', self::O_UPDATE_INTERVAL ) ;
$config = apply_filters( 'litespeed_conf', self::O_UPDATE_INTERVAL ) ;
if ( is_null($config) ) {
$config = self::O_PQS_CS ;
}
Expand Down Expand Up @@ -768,14 +768,13 @@ public function add_review($unused, $comment_approved, $commentdata)
* @since 1.6.3 Removed static
* @since 3.0 new API
*/
private function _option_append()
{
private function _option_append() {
// Append option save value filter
do_action( 'litespeed_conf_multi_switch', self::O_UPDATE_INTERVAL, 3 ); // This need to be before conf_append

do_action( 'litespeed_conf_append', self::O_UPDATE_INTERVAL, false );
do_action( 'litespeed_conf_append', self::O_SHOP_FRONT_TTL, true );
do_action( 'litespeed_conf_append', self::O_WOO_CACHE_CART, true );

// Append option save value filter
do_action( 'litespeed_conf_multi_switch', self::O_UPDATE_INTERVAL, 3 );
}

/**
Expand Down

0 comments on commit afad964

Please sign in to comment.