Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
add_action( 'woocommerce_product_query', 'custom_pre_get_posts_query' );
function custom_pre_get_posts_query( $query ) {
$query->set( 'meta_query', array( array(
'key' => '_thumbnail_id',
'value' => '0',
'compare' => '>'
)));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment