enter image description here

I made a flag on my woocommerce orders called “recurring” which flags whether an order recurs or not. When I select the flag on the Checkout page, the acf fields are being saved as encrypted fields I think because in the “Custom Fields” section of the view orders, it has new fields which are labeled “field_##UID##”.

So, when i query wordpress

	$args = array(
	  'post_type' => 'shop_order',
	 'post_status' => 'any',
	  'posts_per_page' => -1,
		'numberposts' => -1,
	'meta_key'		=> 'recurring',
	'meta_value'	=> 1
	);


// query
$posts = get_posts($args);

It doesnt return any posts, even though I know that the post is receiving the properties because it shows up on the order details:

How do I query wordpress for shop orders which have this flag == 1?

Read more here: WP_QUERY Advance Custom Fields (ACF) not working


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.


Wordpress related questions and answers: