woocommerce_product_post_type_link_parent_category_only

woocommerce_product_post_type_link_parent_category_only

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

See hook in core

Displaying hooks found in version: woocommerce.8.7.0

apply_filters('woocommerce_product_post_type_link_parent_category_only') is found 1 times:

  • /includes/wc-product-functions.php line 243
    		if ( $category_object->parent ) {
    			$ancestors = get_ancestors( $category_object->term_id, 'product_cat' );
    			foreach ( $ancestors as $ancestor ) {
    				$ancestor_object = get_term( $ancestor, 'product_cat' );
    				if ( apply_filters( 'woocommerce_product_post_type_link_parent_category_only', false ) ) {
    					$product_cat = $ancestor_object->slug;
    				} else {
    					$product_cat = $ancestor_object->slug . '/' . $product_cat;
    				}
    			}
    		}
    
woocommerce_product_post_type_link_parent_category_only - WordPress Hooks

woocommerce_product_post_type_link_parent_category_only

woocommerce_product_post_type_link_parent_category_only

Appears in:
Hook Type: filter

See hook in core

Displaying hooks found in version: woocommerce.3.6.3

apply_filters('woocommerce_product_post_type_link_parent_category_only') is found 1 times:

  • /includes/wc-product-functions.php line 219
    Warning: file(/home/c6974294/public_html/wp-plugin-api.com/sources/plugin/woocommerce/woocommerce.3.6.3/includes/wc-product-functions.php): Failed to open stream: No such file or directory in /home/c6974294/public_html/wp-plugin-api.com/wp-content/themes/wordpress-hooks/functions.php on line 154

    Warning: Trying to access array offset on value of type bool in /home/c6974294/public_html/wp-plugin-api.com/wp-content/themes/wordpress-hooks/functions.php on line 167

    Warning: Undefined array key 215 in /home/c6974294/public_html/wp-plugin-api.com/wp-content/themes/wordpress-hooks/functions.php on line 167

    Warning: Undefined array key 216 in /home/c6974294/public_html/wp-plugin-api.com/wp-content/themes/wordpress-hooks/functions.php on line 167

    Warning: Undefined array key 217 in /home/c6974294/public_html/wp-plugin-api.com/wp-content/themes/wordpress-hooks/functions.php on line 167

    Warning: Undefined array key 218 in /home/c6974294/public_html/wp-plugin-api.com/wp-content/themes/wordpress-hooks/functions.php on line 167

    Warning: Undefined array key 219 in /home/c6974294/public_html/wp-plugin-api.com/wp-content/themes/wordpress-hooks/functions.php on line 167

    Warning: Undefined array key 220 in /home/c6974294/public_html/wp-plugin-api.com/wp-content/themes/wordpress-hooks/functions.php on line 167

    Warning: Undefined array key 221 in /home/c6974294/public_html/wp-plugin-api.com/wp-content/themes/wordpress-hooks/functions.php on line 167

    Warning: Undefined array key 222 in /home/c6974294/public_html/wp-plugin-api.com/wp-content/themes/wordpress-hooks/functions.php on line 167

    Warning: Undefined array key 223 in /home/c6974294/public_html/wp-plugin-api.com/wp-content/themes/wordpress-hooks/functions.php on line 167

    Warning: Undefined array key 224 in /home/c6974294/public_html/wp-plugin-api.com/wp-content/themes/wordpress-hooks/functions.php on line 167