woocommerce_get_product_subcategories_cache_key

woocommerce_get_product_subcategories_cache_key

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: woocommerce.9.5.1

apply_filters('woocommerce_get_product_subcategories_cache_key') is found 1 times:

  • /includes/wc-template-functions.php line 2749
    	 * @return array
    	 */
    	function woocommerce_get_product_subcategories( $parent_id = 0 ) {
    		$parent_id          = absint( $parent_id );
    		$cache_key          = apply_filters( 'woocommerce_get_product_subcategories_cache_key', 'product-category-hierarchy-' . $parent_id, $parent_id );
    		$product_categories = $cache_key ? wp_cache_get( $cache_key, 'product_cat' ) : false;
    
    		if ( false === $product_categories ) {
    			// NOTE: using child_of instead of parent - this is not ideal but due to a WP bug ( https://core.trac.wordpress.org/ticket/15626 ) pad_counts won't work.
    			$product_categories = get_categories(
    				apply_filters(