Skip to content

Commit

Permalink
Merge pull request #204 from dparker1005/dev
Browse files Browse the repository at this point in the history
Fix purchasing levels from single level group
  • Loading branch information
andrewlimaza committed May 27, 2024
2 parents 89ea183 + f63ae95 commit 8a9f9c9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pmpro-woocommerce.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,11 @@ function pmprowoo_is_purchasable( $is_purchasable, $product ) {
continue;
}

// If the cart product is the same as the product passed into this function, continue.
if ( $product_id === $product->get_id() ) {
continue;
}

// Get the group ID for the product in the cart.
$group_id_in_cart = pmpro_get_group_id_for_level( $pmprowoo_product_levels[ $product_id ] );
if ( empty( $group_id_in_cart ) ) {
Expand Down

0 comments on commit 8a9f9c9

Please sign in to comment.