Skip to content

Commit

Permalink
Merge branch 'develop' into fix/9103-payments-settings-originated-onb…
Browse files Browse the repository at this point in the history
…oarding-flow
  • Loading branch information
vladolaru authored Jul 16, 2024
2 parents 9a5c01e + d6c8dc4 commit 370b0f8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions changelog/fix-fatal-errors-when-subscriptions-are-unavailable
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fix

Fixing fatal errors when subscription classes are not available
Original file line number Diff line number Diff line change
Expand Up @@ -1080,6 +1080,10 @@ private function validate_subscription_data( $subscription_data ) {
* @return bool True if store has active WCPay subscriptions, otherwise false.
*/
public static function store_has_active_wcpay_subscriptions() {
if ( ! function_exists( 'wcs_get_subscriptions' ) ) {
return false;
}

$active_wcpay_subscriptions = wcs_get_subscriptions(
[
'subscriptions_per_page' => 1,
Expand Down

0 comments on commit 370b0f8

Please sign in to comment.