Include version in the implode call.

This commit is contained in:
Gerhard 2019-05-06 14:53:03 +02:00
parent 6a6b58daf6
commit 4c80c6fd3b
1 changed files with 2 additions and 2 deletions

View File

@ -157,7 +157,7 @@ function wc_update_order( $args ) {
* @param string $name Template name (default: '').
*/
function wc_get_template_part( $slug, $name = '' ) {
$cache_key = sanitize_key( implode( '-', array( 'template-part', $slug, $name ) ) . '_' . WC()->version );
$cache_key = sanitize_key( implode( '-', array( 'template-part', $slug, $name, WC()->version ) ) );
$template = (string) wp_cache_get( $cache_key, 'woocommerce' );
if ( ! $template ) {
@ -205,7 +205,7 @@ function wc_get_template_part( $slug, $name = '' ) {
* @param string $default_path Default path. (default: '').
*/
function wc_get_template( $template_name, $args = array(), $template_path = '', $default_path = '' ) {
$cache_key = sanitize_key( implode( '-', array( 'template', $template_name, $template_path, $default_path ) ) . '_' . WC()->version );
$cache_key = sanitize_key( implode( '-', array( 'template', $template_name, $template_path, $default_path, WC()->version ) ) );
$template = (string) wp_cache_get( $cache_key, 'woocommerce' );
if ( ! $template ) {