[2.3] Only clear in delete_version_transients when version is set

This commit is contained in:
Mike Jolley 2015-05-27 15:56:42 +01:00
parent 267c481d86
commit 915342f38b
1 changed files with 1 additions and 1 deletions

View File

@ -62,7 +62,7 @@ class WC_Cache_Helper {
* @since 2.3.10
*/
private static function delete_version_transients( $version ) {
if ( ! wp_using_ext_object_cache() ) {
if ( ! wp_using_ext_object_cache() && ! empty( $version ) ) {
global $wpdb;
$wpdb->query( $wpdb->prepare( "DELETE FROM {$wpdb->options} WHERE option_name LIKE %s;", "\_transient\_%" . $version ) );
}