Skip to content

Instantly share code, notes, and snippets.

@gyrus
Created June 18, 2019 19:20
Show Gist options
  • Save gyrus/b3ffb5f0c6a4776aa0dec418bceda470 to your computer and use it in GitHub Desktop.
Save gyrus/b3ffb5f0c6a4776aa0dec418bceda470 to your computer and use it in GitHub Desktop.
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