• Resolved Romel Indemne

    (@butch182)


    Great plugin! I need to filter the woocommerce products by ACF field’s value inside the post-drop-down menu. Any suggestion on can I achieve this?

Viewing 1 replies (of 1 total)
  • Plugin Author Markus Wiesenhofer

    (@markusfroehlich)

    Hello butch182!
    Yes you can use the “wpcf7_yourtag_get_posts” filter in your functions.php file.

    For example:

    
    add_filter("wpcf7_yourtag_get_posts", "filter_dropdown_posts");
    
    function filter_dropdown_posts($post_args)
    {
    	$post_args['meta_query'] = array(
    		array(
    			'key' => 'my_key',
    			'value' => 'my_filter_value')
    		)
    
    	return $post_args;
    }
    

    Best regards
    Markus

Viewing 1 replies (of 1 total)
  • The topic ‘Filter woocommerce product with ACF field’ is closed to new replies.