Change recent sales eligibility transient string to yes/no

This commit is contained in:
Eric Jinks 2022-05-10 06:45:27 +10:00
parent ae954f3cc5
commit 1aa88a9cb7
No known key found for this signature in database
GPG Key ID: 22C09ACBC4DC9279
1 changed files with 3 additions and 3 deletions

View File

@ -127,7 +127,7 @@ class WcPaySubscriptionsPage {
// Valid cache found.
if ( false !== $is_eligible ) {
return 'eligible' === $is_eligible;
return 'yes' === $is_eligible;
}
// Get a single order that was marked as completed within the last 30 days.
@ -139,10 +139,10 @@ class WcPaySubscriptionsPage {
)
);
$is_eligible = count( $orders ) >= 1 ? 'eligible' : 'not_eligible';
$is_eligible = count( $orders ) >= 1 ? 'yes' : 'no';
set_transient( $transient_key, $is_eligible, DAY_IN_SECONDS );
return 'eligible' === $is_eligible;
return 'yes' === $is_eligible;
}
/**