Merge pull request #18388 from woocommerce/fix/18385

Change transient name for shortcode query results transient
This commit is contained in:
Mike Jolley 2018-01-09 09:25:59 +00:00 committed by GitHub
commit ac197d35cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 3 deletions

View File

@ -2,8 +2,6 @@
/**
* Products shortcode
*
* @author Automattic
* @category Shortcodes
* @package WooCommerce/Shortcodes
* @version 3.2.4
*/
@ -474,7 +472,7 @@ class WC_Shortcode_Products {
* @return string
*/
protected function get_transient_name() {
$transient_name = 'wc_loop' . substr( md5( wp_json_encode( $this->query_args ) . $this->type ), 28 );
$transient_name = 'wc_product_loop' . substr( md5( wp_json_encode( $this->query_args ) . $this->type ), 28 );
if ( 'rand' === $this->query_args['orderby'] ) {
// When using rand, we'll cache a number of random queries and pull those to avoid querying rand on each page load.