aioseo_sitemap_woocommerce_exclude_hidden_products

aioseo_sitemap_woocommerce_exclude_hidden_products

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

See hook in core

Displaying hooks found in version: all-in-one-seo-pack.4.8.1.1

apply_filters('aioseo_sitemap_woocommerce_exclude_hidden_products') is found 2 times:

  • /app/Common/Sitemap/Query.php line 211
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    */
    private function excludeHiddenProducts( $query ) {
        if (
            ! aioseo()->helpers->isWooCommerceActive() ||
            ! apply_filters( 'aioseo_sitemap_woocommerce_exclude_hidden_products', true )
        ) {
            return $query;
        }
     
        static $hiddenProductIds = null;
        if ( null === $hiddenProductIds ) {
  • /app/Common/Sitemap/Root.php line 371
    367
    368
    369
    370
    371
    372
    373
    374
    375
    376
    377
        $whereClause     = "AND p.ID NOT IN ( $implodedPostIds )";
    }
     
    if (
        apply_filters( 'aioseo_sitemap_woocommerce_exclude_hidden_products', true ) &&
        aioseo()->helpers->isWooCommerceActive() &&
        'product' === $postType
    ) {
        $whereClause .= " AND p.ID NOT IN (
            SELECT CONVERT(tr.object_id, unsigned) AS object_id
            FROM {$termRelationshipsTable} AS tr