woocommerce_product_related_posts_query

woocommerce_product_related_posts_query

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

See hook in core

Displaying hooks found in version: woocommerce.8.7.0

apply_filters('woocommerce_product_related_posts_query') is found 1 times:

  • /includes/data-stores/class-wc-product-data-store-cpt.php line 1284
    			'exclude_ids' => $exclude_ids,
    			'limit'       => $limit + 10,
    		);
    
    		$related_product_query = (array) apply_filters( 'woocommerce_product_related_posts_query', $this->get_related_products_query( $cats_array, $tags_array, $exclude_ids, $limit + 10 ), $product_id, $args );
    
    		// phpcs:ignore WordPress.VIP.DirectDatabaseQuery.DirectQuery, WordPress.DB.PreparedSQL.NotPrepared
    		return $wpdb->get_col( implode( ' ', $related_product_query ) );
    	}
    
    	/**