Skip to content

Commit

Permalink
fix: missing woocommerce-memberships handling
Browse files Browse the repository at this point in the history
  • Loading branch information
adekbadek committed Feb 27, 2024
1 parent b31fb78 commit 76dbdf7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions includes/hub/admin/class-membership-plans.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,9 @@ public static function get_membershp_plans_from_nodes() {
*/
public static function get_local_membership_plans() {
$membership_plans = [];
if ( ! function_exists( 'wc_memberships_get_membership_plans' ) ) {
return [];
}
foreach ( wc_memberships_get_membership_plans() as $plan ) {
$membership_plans[] = [
'id' => $plan->post->ID,
Expand Down

0 comments on commit 76dbdf7

Please sign in to comment.