Created
March 12, 2019 19:40
-
-
Save lukecav/59a9fd5071cdf96010e88f3069009f6e to your computer and use it in GitHub Desktop.
Preload product categories in WooCommerce when using WP Super Cache
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'wp_cache_preload_taxonomies', 'wpsc_preload_taxonomies' ); | |
function wpsc_preload_taxonomies( $taxes ) { | |
return array_merge( $taxes, array( 'product_tag' => 'product_tag', 'product_cat' => 'product_cat' ) ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://github.com/Automattic/wp-super-cache/issues/375#issuecomment-347841470
https://wordpress.org/support/topic/preload-does-not-preload-woocommerce-product-categories/