Skip to content

Instantly share code, notes, and snippets.

<?php
//set up pods::find parameters to limit to 5 items
$param = array(
'limit' => 5,
);
//create pods object
$pods = pods('pod_name', $params );
//check that total values (given limit) returned is greater than zero
if ( $pods->total() > 0 ) {
@andrepetrini
andrepetrini / checkout_levels_api_demo.php
Created March 2, 2022 19:37 — forked from dparker1005/checkout_levels_api_demo.php
2 demos to demonstrate the PMPro checkout_levels API call.
<?php
// Copy from below here...
/*
* Add widget to checkout to get result of checkout_levels API call when button is pressed.
*/
function my_pmpro_test_checkout_levels_api() {
?>
<hr/>