breadcrumbspress_query_is_woocommerce_endpoint

Developer Knowledge Level

This content is intended for WordPress developers, and it may require coding knowledge of WordPress, PHP, and JavaScript. Code examples provided here may contain errors or needs some additional coding. Make sure to test the code before using it on a live website!

Definition
apply_filters( "breadcrumbspress_query_is_woocommerce_endpoint", $is );
Arguments
Name
Type
Description
$is
boolean
The detected condition before this filter is applied.
Returns
Return a boolean detection result.

Filters whether BreadcrumbsPress recognizes the request as a WooCommerce endpoint.

BreadcrumbsPress casts the filtered value to boolean. This changes its internal request classification and can affect which visibility settings and breadcrumb builders are selected. Register the filter before the plugin evaluates the query; keep unrelated conditions intact. The default detection also checks that the relevant integration is available.

Example

This example registers a callback for the filter. Adapt the values and conditions to your site.

add_filter( 'breadcrumbspress_query_is_woocommerce_endpoint', function( $is ) {
    if ( is_page( 'example-excluded-page' ) ) {
        return false;
    }
    return $is;
}, 10, 1 );
Rate this reference
0
0
2

You are not allowed to rate this post.

Leave a Comment

0
0
0
0
0
0
0
0
0