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.7.5.1

apply_filters('aioseo_sitemap_woocommerce_exclude_hidden_products') is found 2 times:

  • /app/Common/Sitemap/Query.php line 211
    	 */
    	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 348
    			$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