Created
June 18, 2019 19:20
-
-
Save gyrus/b3ffb5f0c6a4776aa0dec418bceda470 to your computer and use it in GitHub Desktop.
GFAPI::get_entries() 'in' operator
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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