@codesinger0/shared-components 1.1.100 → 1.1.101
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -45,7 +45,8 @@ const OrderForm = ({
|
|
|
45
45
|
businessName,
|
|
46
46
|
paymentLinkCreationURL,
|
|
47
47
|
scrollContainerRef,
|
|
48
|
-
clearCart // Function to clear cart after successful order
|
|
48
|
+
clearCart, // Function to clear cart after successful order
|
|
49
|
+
enableClubMembership = true // Control whether to show club membership section
|
|
49
50
|
}) => {
|
|
50
51
|
|
|
51
52
|
const [nameError, setNameError] = useState('');
|
|
@@ -59,7 +60,7 @@ const OrderForm = ({
|
|
|
59
60
|
const isWorkshopPurchase = !!workshopData;
|
|
60
61
|
const isDigitalPurchase = isCoursePurchase; // Only courses are digital
|
|
61
62
|
const isUserClubMember = currentUserData?.isClubMember || false;
|
|
62
|
-
const shouldShowClubMembership = !isUserClubMember;
|
|
63
|
+
const shouldShowClubMembership = enableClubMembership && !isUserClubMember;
|
|
63
64
|
const clubDiscountPercentage = settings?.clubDiscountPercentage || 10;
|
|
64
65
|
|
|
65
66
|
const items = isCoursePurchase ? [courseData] : isWorkshopPurchase ? [workshopData] : cartItems;
|