Category: WP plugins

Modifying the WooCommerce Product Query

Modifying the WooCommerce Product Query

WooCommerce builds a custom query for products in its WC_Query class by hooking into the classic pre_get_posts hook and changing WordPress’s query parameters to get the desired products. WooCommerce then removes itself from the query afterward. I am not 100% sure of why, but I presume there is a good reason. It might be running in WooCommerce, but it…

Read More Read More