GFAPI nested conditions in get_entries field_filters

Hi,

I’m trying to figure out how to make a nested GFAPI get_entries call but I can’t find it in the documentation. Some has pointed to GF_QUERY, but I also can’t find it in documentation.

Basically, I’m trying to get entries that are Paid via paypal or used a coupon code (100% discount code).

Also, I’m not very sure if it’s a bug. If I used 100% discount coupon, the payment status is set to NULL and not Paid.

Here’s my search_filters setup (doesn’t work)

$search_criteria = array(
		'status'        => 'active',
		'field_filters' => array(
            array(
                'key' => 'gravityformspaypal_is_fulfilled',
                'value' => 1
            ),
            array(
                'mode' => 'any',
                array(
                    'key'   => '23', //field for coupon
                    'value' => '',
                    'operator' => '!='
                ),
                array(
                    'key'   => 'payment_status',
                    'value' => 'Paid'
                )
            )
		)
	);

What’s the best way to do it?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.