Follow up to ensure we are excluding quick config price sets as per the previous...
authorSeamus Lee <seamuslee001@gmail.com>
Thu, 17 Aug 2023 21:25:10 +0000 (07:25 +1000)
committerSeamus Lee <seamuslee001@gmail.com>
Thu, 17 Aug 2023 21:25:10 +0000 (07:25 +1000)
CRM/Contribute/Form/ContributionPage/Amount.php
CRM/Member/Form/MembershipBlock.php

index 544856b4f0d95c59dca58e3bc077e59f282845ef..910d57e1a9e02e4df6d75604c9a9d58ccdfd9b67 100644 (file)
@@ -382,7 +382,7 @@ class CRM_Contribute_Form_ContributionPage_Amount extends CRM_Contribute_Form_Co
     if ($priceSetId) {
       // don't allow price set w/ membership.
       if ($hasMembershipBlk) {
-        $errors['price_set_id'] = ts('You cannot enable both Membership Signup and a Contribution Price Set on the same online contribution page');
+        $errors['price_set_id'] = ts('You cannot enable both Membership Signup and a Contribution Price Set on the same online contribution page.');
       }
     }
     else {
index 7834352d4fa17da0cdb2d3be4e2fd1dc57526f9c..9018e63bc481866b7eeae98698cd4a4bbeaa834e 100644 (file)
@@ -248,6 +248,7 @@ class CRM_Member_Form_MembershipBlock extends CRM_Contribute_Form_ContributionPa
         ->addWhere('entity_table', '=', 'civicrm_contribution_page')
         ->addWhere('entity_id', '=', $contributionPageId)
         ->addWhere('price_set.extends:name', 'CONTAINS', 'CiviMember')
+        ->addWhere('price_set.is_quick_config', '=', 0)
         ->execute()
         ->first();
       if (!$priceSetExtendsMembership) {