Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
GFAPI::get_entries() 'in' operator
<?php
$most_recent_subscription = GFAPI::get_entries(
[ 1, 3 ],
[
'status' => 'active',
'field_filters' => [
[
'key' => 'transaction_type',
'value' => 2,
],
[
'key' => 'payment_status',
'value' => [ 'Active', 'Paid' ],
'operator' => 'in',
],
[
'key' => 'created_by',
'value' => $user_id,
],
],
],
[
'key' => 'payment_date',
'direction' => 'DESC',
],
[
'page_size' => 1
]
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.