From ee845acadc03ab3e3dd13ee49f38d15b0d724b16 Mon Sep 17 00:00:00 2001
From: Kevin Cristiano <kcristiano@kcristiano.com>
Date: Sat, 17 Jun 2023 08:13:21 -0400
Subject: [PATCH] civicrm release-5.62.1

---
 civicrm.php                                   |  4 +-
 .../CRM/Contribute/Form/Contribution/Main.php |  2 +-
 .../CRM/Contribute/Form/ContributionBase.php  | 16 ++++---
 civicrm/CRM/Financial/BAO/Order.php           | 10 +++++
 civicrm/civicrm-version.php                   |  2 +-
 civicrm/ext/afform/admin/info.xml             |  2 +-
 civicrm/ext/afform/core/info.xml              |  2 +-
 civicrm/ext/afform/html/info.xml              |  2 +-
 civicrm/ext/afform/mock/info.xml              |  2 +-
 civicrm/ext/authx/info.xml                    |  2 +-
 civicrm/ext/civicrm_admin_ui/info.xml         |  2 +-
 civicrm/ext/civigrant/info.xml                |  2 +-
 civicrm/ext/civiimport/info.xml               |  2 +-
 civicrm/ext/ckeditor4/info.xml                |  2 +-
 .../ext/contributioncancelactions/info.xml    |  2 +-
 civicrm/ext/elavon/info.xml                   |  2 +-
 civicrm/ext/eventcart/info.xml                |  2 +-
 civicrm/ext/ewaysingle/info.xml               |  2 +-
 civicrm/ext/financialacls/info.xml            |  2 +-
 civicrm/ext/flexmailer/info.xml               |  2 +-
 civicrm/ext/greenwich/info.xml                |  2 +-
 civicrm/ext/legacycustomsearches/info.xml     |  2 +-
 civicrm/ext/message_admin/info.xml            |  2 +-
 civicrm/ext/oauth-client/info.xml             |  2 +-
 civicrm/ext/payflowpro/info.xml               |  2 +-
 civicrm/ext/recaptcha/info.xml                |  2 +-
 civicrm/ext/search_kit/info.xml               |  2 +-
 civicrm/ext/sequentialcreditnotes/info.xml    |  2 +-
 civicrm/release-notes.md                      |  9 ++++
 civicrm/release-notes/5.62.1.md               | 42 +++++++++++++++++++
 civicrm/sql/civicrm_data.mysql                |  2 +-
 civicrm/sql/civicrm_generated.mysql           |  2 +-
 .../Form/Contribution/MembershipBlock.tpl     | 16 +++----
 civicrm/vendor/autoload.php                   |  2 +-
 civicrm/vendor/composer/autoload_real.php     | 14 +++----
 civicrm/vendor/composer/autoload_static.php   | 12 +++---
 civicrm/vendor/composer/installed.php         |  4 +-
 civicrm/xml/version.xml                       |  2 +-
 wp-rest/Controller/Url.php                    |  2 +-
 39 files changed, 126 insertions(+), 61 deletions(-)
 create mode 100644 civicrm/release-notes/5.62.1.md

diff --git a/civicrm.php b/civicrm.php
index 53c39ccb55..28fedfa66a 100644
--- a/civicrm.php
+++ b/civicrm.php
@@ -2,7 +2,7 @@
 /**
  * Plugin Name: CiviCRM
  * Description: CiviCRM - Growing and Sustaining Relationships
- * Version: 5.62.0
+ * Version: 5.62.1
  * Requires at least: 4.9
  * Requires PHP:      7.3
  * Author: CiviCRM LLC
@@ -36,7 +36,7 @@ if (!defined('ABSPATH')) {
 }
 
 // Set version here: changing it forces Javascript and CSS to reload.
-define('CIVICRM_PLUGIN_VERSION', '5.62.0');
+define('CIVICRM_PLUGIN_VERSION', '5.62.1');
 
 // Store reference to this file.
 if (!defined('CIVICRM_PLUGIN_FILE')) {
diff --git a/civicrm/CRM/Contribute/Form/Contribution/Main.php b/civicrm/CRM/Contribute/Form/Contribution/Main.php
index da53dd0205..027a68b065 100644
--- a/civicrm/CRM/Contribute/Form/Contribution/Main.php
+++ b/civicrm/CRM/Contribute/Form/Contribution/Main.php
@@ -372,7 +372,7 @@ class CRM_Contribute_Form_Contribution_Main extends CRM_Contribute_Form_Contribu
       // build price set form.
       $this->set('priceSetId', $this->_priceSetId);
       if (empty($this->_ccid)) {
-        CRM_Price_BAO_PriceSet::buildPriceSet($this, $this->getMainEntityType());
+        CRM_Price_BAO_PriceSet::buildPriceSet($this, $this->getFormContext());
       }
       if ($this->_values['is_monetary'] &&
         $this->_values['is_recur'] && empty($this->_values['pledge_id'])
diff --git a/civicrm/CRM/Contribute/Form/ContributionBase.php b/civicrm/CRM/Contribute/Form/ContributionBase.php
index fb6f61e3e7..e534637bc5 100644
--- a/civicrm/CRM/Contribute/Form/ContributionBase.php
+++ b/civicrm/CRM/Contribute/Form/ContributionBase.php
@@ -1305,7 +1305,7 @@ class CRM_Contribute_Form_ContributionBase extends CRM_Core_Form {
    */
   protected function isMembershipPriceSet(): bool {
     if ($this->_useForMember === NULL) {
-      if ($this->getMainEntityType() === 'membership' &&
+      if ($this->getFormContext() === 'membership' &&
         !$this->isQuickConfig()) {
         $this->_useForMember = 1;
       }
@@ -1317,11 +1317,15 @@ class CRM_Contribute_Form_ContributionBase extends CRM_Core_Form {
     return (bool) $this->_useForMember;
   }
 
-  public function getMainEntityType() {
-    if (CRM_Core_Component::isEnabled('CiviMember') && (int) CRM_Core_Component::getComponentID('CiviMember') === (int) $this->order->getPriceSetMetadata()['extends']) {
-      return 'membership';
-    }
-    return 'contribution';
+  /**
+   * Get the form context.
+   *
+   * This is important for passing to the buildAmount hook as CiviDiscount checks it.
+   *
+   * @return string
+   */
+  public function getFormContext(): string {
+    return $this->order->isMembershipPriceSet() ? 'membership' : 'contribution';
   }
 
   /**
diff --git a/civicrm/CRM/Financial/BAO/Order.php b/civicrm/CRM/Financial/BAO/Order.php
index 6f4cbe9a8e..d4a0e299dc 100644
--- a/civicrm/CRM/Financial/BAO/Order.php
+++ b/civicrm/CRM/Financial/BAO/Order.php
@@ -651,6 +651,8 @@ class CRM_Financial_BAO_Order {
   public function getPriceSetMetadata(): array {
     if (empty($this->priceSetMetadata)) {
       $priceSetMetadata = CRM_Price_BAO_PriceSet::getCachedPriceSetDetail($this->getPriceSetID());
+      // @todo - make sure this is an array - commented out for now as this PR is against the rc.
+      // $priceSetMetadata['extends'] = explode(CRM_Core_DAO::VALUE_SEPARATOR, $priceSetMetadata['extends']);
       $this->setPriceFieldMetadata($priceSetMetadata['fields']);
       unset($priceSetMetadata['fields']);
       $this->priceSetMetadata = $priceSetMetadata;
@@ -658,6 +660,14 @@ class CRM_Financial_BAO_Order {
     return $this->priceSetMetadata;
   }
 
+  public function isMembershipPriceSet() {
+    if (!CRM_Core_Component::isEnabled('CiviMember')) {
+      return FALSE;
+    }
+    $extends = explode(CRM_Core_DAO::VALUE_SEPARATOR, $this->getPriceSetMetadata()['extends']);
+    return in_array(CRM_Core_Component::getComponentID('CiviMember'), $extends, FALSE);
+  }
+
   /**
    * Get the financial type id for the order.
    *
diff --git a/civicrm/civicrm-version.php b/civicrm/civicrm-version.php
index 5526e76f26..df07560bb6 100644
--- a/civicrm/civicrm-version.php
+++ b/civicrm/civicrm-version.php
@@ -1,7 +1,7 @@
 <?php
 /** @deprecated */
 function civicrmVersion( ) {
-  return array( 'version'  => '5.62.0',
+  return array( 'version'  => '5.62.1',
                 'cms'      => 'Wordpress',
                 'revision' => '' );
 }
diff --git a/civicrm/ext/afform/admin/info.xml b/civicrm/ext/afform/admin/info.xml
index 645f34cf0a..aea2cc2c6b 100644
--- a/civicrm/ext/afform/admin/info.xml
+++ b/civicrm/ext/afform/admin/info.xml
@@ -13,7 +13,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2020-01-09</releaseDate>
-  <version>5.62.0</version>
+  <version>5.62.1</version>
   <develStage>beta</develStage>
   <compatibility>
     <ver>5.62</ver>
diff --git a/civicrm/ext/afform/core/info.xml b/civicrm/ext/afform/core/info.xml
index 91a636dbd7..722b61b457 100644
--- a/civicrm/ext/afform/core/info.xml
+++ b/civicrm/ext/afform/core/info.xml
@@ -13,7 +13,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2020-01-09</releaseDate>
-  <version>5.62.0</version>
+  <version>5.62.1</version>
   <develStage>beta</develStage>
   <compatibility>
     <ver>5.62</ver>
diff --git a/civicrm/ext/afform/html/info.xml b/civicrm/ext/afform/html/info.xml
index b093ffc97e..08fa606b9f 100644
--- a/civicrm/ext/afform/html/info.xml
+++ b/civicrm/ext/afform/html/info.xml
@@ -13,7 +13,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2020-01-09</releaseDate>
-  <version>5.62.0</version>
+  <version>5.62.1</version>
   <develStage>alpha</develStage>
   <compatibility>
     <ver>5.62</ver>
diff --git a/civicrm/ext/afform/mock/info.xml b/civicrm/ext/afform/mock/info.xml
index 6456f036c3..063eee130a 100644
--- a/civicrm/ext/afform/mock/info.xml
+++ b/civicrm/ext/afform/mock/info.xml
@@ -12,7 +12,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2020-01-09</releaseDate>
-  <version>5.62.0</version>
+  <version>5.62.1</version>
   <tags>
     <tag>mgmt:hidden</tag>
   </tags>
diff --git a/civicrm/ext/authx/info.xml b/civicrm/ext/authx/info.xml
index 026cd5a627..bc39ac1213 100644
--- a/civicrm/ext/authx/info.xml
+++ b/civicrm/ext/authx/info.xml
@@ -15,7 +15,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2021-02-11</releaseDate>
-  <version>5.62.0</version>
+  <version>5.62.1</version>
   <develStage>stable</develStage>
   <compatibility>
     <ver>5.62</ver>
diff --git a/civicrm/ext/civicrm_admin_ui/info.xml b/civicrm/ext/civicrm_admin_ui/info.xml
index 20824b8370..991550a7bc 100644
--- a/civicrm/ext/civicrm_admin_ui/info.xml
+++ b/civicrm/ext/civicrm_admin_ui/info.xml
@@ -15,7 +15,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2022-01-02</releaseDate>
-  <version>5.62.0</version>
+  <version>5.62.1</version>
   <develStage>alpha</develStage>
   <compatibility>
     <ver>5.62</ver>
diff --git a/civicrm/ext/civigrant/info.xml b/civicrm/ext/civigrant/info.xml
index 33f0b2a4cd..c033ea0169 100644
--- a/civicrm/ext/civigrant/info.xml
+++ b/civicrm/ext/civigrant/info.xml
@@ -13,7 +13,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2021-11-11</releaseDate>
-  <version>5.62.0</version>
+  <version>5.62.1</version>
   <develStage>stable</develStage>
   <compatibility>
     <ver>5.62</ver>
diff --git a/civicrm/ext/civiimport/info.xml b/civicrm/ext/civiimport/info.xml
index da07276df2..997e75eae3 100644
--- a/civicrm/ext/civiimport/info.xml
+++ b/civicrm/ext/civiimport/info.xml
@@ -15,7 +15,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2022-08-11</releaseDate>
-  <version>5.62.0</version>
+  <version>5.62.1</version>
   <develStage>alpha</develStage>
   <compatibility>
     <ver>5.62</ver>
diff --git a/civicrm/ext/ckeditor4/info.xml b/civicrm/ext/ckeditor4/info.xml
index 2d487d7c7f..bc855d14ea 100644
--- a/civicrm/ext/ckeditor4/info.xml
+++ b/civicrm/ext/ckeditor4/info.xml
@@ -15,7 +15,7 @@
     <url desc="Licensing">https://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2021-05-23</releaseDate>
-  <version>5.62.0</version>
+  <version>5.62.1</version>
   <develStage>stable</develStage>
   <compatibility>
     <ver>5.62</ver>
diff --git a/civicrm/ext/contributioncancelactions/info.xml b/civicrm/ext/contributioncancelactions/info.xml
index 3d4953354c..eeb0b2d305 100644
--- a/civicrm/ext/contributioncancelactions/info.xml
+++ b/civicrm/ext/contributioncancelactions/info.xml
@@ -15,7 +15,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2020-10-12</releaseDate>
-  <version>5.62.0</version>
+  <version>5.62.1</version>
   <develStage>stable</develStage>
   <compatibility>
     <ver>5.62</ver>
diff --git a/civicrm/ext/elavon/info.xml b/civicrm/ext/elavon/info.xml
index b5090838e0..fb4eb4ca52 100644
--- a/civicrm/ext/elavon/info.xml
+++ b/civicrm/ext/elavon/info.xml
@@ -15,7 +15,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2022-08-05</releaseDate>
-  <version>5.62.0</version>
+  <version>5.62.1</version>
   <develStage>stable</develStage>
   <compatibility>
     <ver>5.62</ver>
diff --git a/civicrm/ext/eventcart/info.xml b/civicrm/ext/eventcart/info.xml
index e40c01f8ca..7a6d32397c 100644
--- a/civicrm/ext/eventcart/info.xml
+++ b/civicrm/ext/eventcart/info.xml
@@ -13,7 +13,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2020-08-03</releaseDate>
-  <version>5.62.0</version>
+  <version>5.62.1</version>
   <tags>
     <tag>mgmt:hidden</tag>
   </tags>
diff --git a/civicrm/ext/ewaysingle/info.xml b/civicrm/ext/ewaysingle/info.xml
index 223bf96983..9d1cef7239 100644
--- a/civicrm/ext/ewaysingle/info.xml
+++ b/civicrm/ext/ewaysingle/info.xml
@@ -15,7 +15,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2020-10-07</releaseDate>
-  <version>5.62.0</version>
+  <version>5.62.1</version>
   <tags>
     <tag>mgmt:hidden</tag>
   </tags>
diff --git a/civicrm/ext/financialacls/info.xml b/civicrm/ext/financialacls/info.xml
index 9351fdf67c..de3a14b58e 100644
--- a/civicrm/ext/financialacls/info.xml
+++ b/civicrm/ext/financialacls/info.xml
@@ -15,7 +15,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2020-08-27</releaseDate>
-  <version>5.62.0</version>
+  <version>5.62.1</version>
   <develStage>stable</develStage>
   <compatibility>
     <ver>5.62</ver>
diff --git a/civicrm/ext/flexmailer/info.xml b/civicrm/ext/flexmailer/info.xml
index a8eca49edc..4165deab47 100644
--- a/civicrm/ext/flexmailer/info.xml
+++ b/civicrm/ext/flexmailer/info.xml
@@ -15,7 +15,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2020-08-05</releaseDate>
-  <version>5.62.0</version>
+  <version>5.62.1</version>
   <develStage>stable</develStage>
   <comments>
     FlexMailer is an email delivery engine which replaces the internal guts
diff --git a/civicrm/ext/greenwich/info.xml b/civicrm/ext/greenwich/info.xml
index 5bf778a5de..546f09a6f5 100644
--- a/civicrm/ext/greenwich/info.xml
+++ b/civicrm/ext/greenwich/info.xml
@@ -15,7 +15,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2020-07-21</releaseDate>
-  <version>5.62.0</version>
+  <version>5.62.1</version>
   <tags>
     <tag>mgmt:hidden</tag>
   </tags>
diff --git a/civicrm/ext/legacycustomsearches/info.xml b/civicrm/ext/legacycustomsearches/info.xml
index 82cd97ecfa..ae6fd5afeb 100644
--- a/civicrm/ext/legacycustomsearches/info.xml
+++ b/civicrm/ext/legacycustomsearches/info.xml
@@ -15,7 +15,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2021-07-25</releaseDate>
-  <version>5.62.0</version>
+  <version>5.62.1</version>
   <develStage>stable</develStage>
   <tags>
     <tag>mgmt:hidden</tag>
diff --git a/civicrm/ext/message_admin/info.xml b/civicrm/ext/message_admin/info.xml
index 4c6fed34aa..a983646f1f 100644
--- a/civicrm/ext/message_admin/info.xml
+++ b/civicrm/ext/message_admin/info.xml
@@ -15,7 +15,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2021-06-12</releaseDate>
-  <version>5.62.0</version>
+  <version>5.62.1</version>
   <develStage>alpha</develStage>
   <compatibility>
     <ver>5.62</ver>
diff --git a/civicrm/ext/oauth-client/info.xml b/civicrm/ext/oauth-client/info.xml
index 81ee5e353f..ca9604b249 100644
--- a/civicrm/ext/oauth-client/info.xml
+++ b/civicrm/ext/oauth-client/info.xml
@@ -15,7 +15,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2020-10-23</releaseDate>
-  <version>5.62.0</version>
+  <version>5.62.1</version>
   <develStage>stable</develStage>
   <compatibility>
     <ver>5.62</ver>
diff --git a/civicrm/ext/payflowpro/info.xml b/civicrm/ext/payflowpro/info.xml
index 0c8700ae5d..831b34bf28 100644
--- a/civicrm/ext/payflowpro/info.xml
+++ b/civicrm/ext/payflowpro/info.xml
@@ -15,7 +15,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2021-04-13</releaseDate>
-  <version>5.62.0</version>
+  <version>5.62.1</version>
   <develStage>stable</develStage>
   <compatibility>
     <ver>5.62</ver>
diff --git a/civicrm/ext/recaptcha/info.xml b/civicrm/ext/recaptcha/info.xml
index bf7ec4d39a..18c9307b8f 100644
--- a/civicrm/ext/recaptcha/info.xml
+++ b/civicrm/ext/recaptcha/info.xml
@@ -13,7 +13,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2021-04-03</releaseDate>
-  <version>5.62.0</version>
+  <version>5.62.1</version>
   <tags>
     <tag>mgmt:hidden</tag>
   </tags>
diff --git a/civicrm/ext/search_kit/info.xml b/civicrm/ext/search_kit/info.xml
index 14fe943a0c..9b6156bb2a 100644
--- a/civicrm/ext/search_kit/info.xml
+++ b/civicrm/ext/search_kit/info.xml
@@ -15,7 +15,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2021-01-06</releaseDate>
-  <version>5.62.0</version>
+  <version>5.62.1</version>
   <develStage>stable</develStage>
   <tags>
     <tag>mgmt:required</tag>
diff --git a/civicrm/ext/sequentialcreditnotes/info.xml b/civicrm/ext/sequentialcreditnotes/info.xml
index 6e79787434..9ca1f42c8e 100644
--- a/civicrm/ext/sequentialcreditnotes/info.xml
+++ b/civicrm/ext/sequentialcreditnotes/info.xml
@@ -15,7 +15,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2020-01-28</releaseDate>
-  <version>5.62.0</version>
+  <version>5.62.1</version>
   <tags>
     <tag>mgmt:hidden</tag>
   </tags>
diff --git a/civicrm/release-notes.md b/civicrm/release-notes.md
index d6db6ed473..88e25dc072 100644
--- a/civicrm/release-notes.md
+++ b/civicrm/release-notes.md
@@ -15,6 +15,15 @@ Other resources for identifying changes are:
     * https://github.com/civicrm/civicrm-joomla
     * https://github.com/civicrm/civicrm-wordpress
 
+## CiviCRM 5.62.1
+
+Released June 16, 2023
+
+- **[Synopsis](release-notes/5.62.1.md#synopsis)**
+- **[Bugs resolved](release-notes/5.62.1.md#bugs)**
+- **[Credits](release-notes/5.62.1.md#credits)**
+- **[Feedback](release-notes/5.62.1.md#feedback)**
+
 ## CiviCRM 5.62.0
 
 Released June 7, 2023
diff --git a/civicrm/release-notes/5.62.1.md b/civicrm/release-notes/5.62.1.md
new file mode 100644
index 0000000000..c0086208bd
--- /dev/null
+++ b/civicrm/release-notes/5.62.1.md
@@ -0,0 +1,42 @@
+# CiviCRM 5.62.1
+
+Released June 16, 2023
+
+- **[Synopsis](#synopsis)**
+- **[Bugs resolved](#bugs)**
+- **[Credits](#credits)**
+- **[Feedback](#feedback)**
+
+## <a name="synopsis"></a>Synopsis
+
+| *Does this version...?*                                         |          |
+| --------------------------------------------------------------- | -------- |
+| Change the database schema?                                     | no       |
+| Alter the API?                                                  | no       |
+| Require attention to configuration options?                     | no       |
+| Fix problems installing or upgrading to a previous version?     | no       |
+| Introduce features?                                             | no       |
+| **Fix bugs?**                                                   | **yes**  |
+| Fix security vulnerabilities?                                   | no       |
+
+## <a name="bugs"></a>Bugs resolved
+
+* **_CiviMail_: Click-through URLs broken on WordPress ([dev/core#4363](https://lab.civicrm.org/dev/core/-/issues/4363): [wordpress#296](https://github.com/civicrm/civicrm-wordpress/pull/296))**
+* **_CiviMember_: Discounts not applied to memberships ([dev/core#4352](https://lab.civicrm.org/dev/core/-/issues/4352): [#26538](https://github.com/civicrm/civicrm-core/pull/26538))**
+* **_CiviMember_: Membership block displayed unnecessarily ([#26541](https://github.com/civicrm/civicrm-core/pull/26541))**
+
+## <a name="credits"></a>Credits
+
+This release was developed by the following authors and reviewers:
+
+Wildsight - Lars Sander-Green; Wikimedia Foundation - Eileen McNaughton; Tadpole
+Collective - Kevin Cristiano; Michael Labriola; Megaphone Technology Consulting - Jon
+Goldberg; JMA Consulting - Seamus Lee; CiviCRM - Coleman Watts, Tim Otten; Calibrate -
+Wouter Hechtermans; ASMAC (American Society of Music Arrangers and Composers) - Jeff
+Kellem
+
+## <a name="feedback"></a>Feedback
+
+These release notes are edited by Tim Otten and Andie Hunt.  If you'd like to
+provide feedback on them, please login to https://chat.civicrm.org/civicrm and
+contact `@agh1`.
diff --git a/civicrm/sql/civicrm_data.mysql b/civicrm/sql/civicrm_data.mysql
index a7e1f2e4e2..30e7c616e1 100644
--- a/civicrm/sql/civicrm_data.mysql
+++ b/civicrm/sql/civicrm_data.mysql
@@ -23647,4 +23647,4 @@ INSERT INTO `civicrm_report_instance`
     ( `domain_id`, `title`, `report_id`, `description`, `permission`, `form_values`)
 VALUES
     (  @domainID, 'Survey Details', 'survey/detail', 'Detailed report for canvassing, phone-banking, walk lists or other surveys.', 'access CiviReport', 'a:39:{s:6:"fields";a:2:{s:9:"sort_name";s:1:"1";s:6:"result";s:1:"1";}s:22:"assignee_contact_id_op";s:2:"eq";s:25:"assignee_contact_id_value";s:0:"";s:12:"sort_name_op";s:3:"has";s:15:"sort_name_value";s:0:"";s:17:"street_number_min";s:0:"";s:17:"street_number_max";s:0:"";s:16:"street_number_op";s:3:"lte";s:19:"street_number_value";s:0:"";s:14:"street_name_op";s:3:"has";s:17:"street_name_value";s:0:"";s:15:"postal_code_min";s:0:"";s:15:"postal_code_max";s:0:"";s:14:"postal_code_op";s:3:"lte";s:17:"postal_code_value";s:0:"";s:7:"city_op";s:3:"has";s:10:"city_value";s:0:"";s:20:"state_province_id_op";s:2:"in";s:23:"state_province_id_value";a:0:{}s:13:"country_id_op";s:2:"in";s:16:"country_id_value";a:0:{}s:12:"survey_id_op";s:2:"in";s:15:"survey_id_value";a:0:{}s:12:"status_id_op";s:2:"eq";s:15:"status_id_value";s:1:"1";s:11:"custom_1_op";s:2:"in";s:14:"custom_1_value";a:0:{}s:11:"custom_2_op";s:2:"in";s:14:"custom_2_value";a:0:{}s:17:"custom_3_relative";s:1:"0";s:13:"custom_3_from";s:0:"";s:11:"custom_3_to";s:0:"";s:11:"description";s:75:"Detailed report for canvassing, phone-banking, walk lists or other surveys.";s:13:"email_subject";s:0:"";s:8:"email_to";s:0:"";s:8:"email_cc";s:0:"";s:10:"permission";s:17:"access CiviReport";s:6:"groups";s:0:"";s:9:"domain_id";i:1;}');
-UPDATE civicrm_domain SET version = '5.62.0';
+UPDATE civicrm_domain SET version = '5.62.1';
diff --git a/civicrm/sql/civicrm_generated.mysql b/civicrm/sql/civicrm_generated.mysql
index 84be84afeb..dbdb5fd7eb 100644
--- a/civicrm/sql/civicrm_generated.mysql
+++ b/civicrm/sql/civicrm_generated.mysql
@@ -3064,7 +3064,7 @@ UNLOCK TABLES;
 LOCK TABLES `civicrm_domain` WRITE;
 /*!40000 ALTER TABLE `civicrm_domain` DISABLE KEYS */;
 INSERT INTO `civicrm_domain` (`id`, `name`, `description`, `version`, `contact_id`, `locales`, `locale_custom_strings`) VALUES
- (1,'Default Domain Name',NULL,'5.62.0',1,NULL,'a:1:{s:5:\"en_US\";a:0:{}}');
+ (1,'Default Domain Name',NULL,'5.62.1',1,NULL,'a:1:{s:5:\"en_US\";a:0:{}}');
 /*!40000 ALTER TABLE `civicrm_domain` ENABLE KEYS */;
 UNLOCK TABLES;
 
diff --git a/civicrm/templates/CRM/Contribute/Form/Contribution/MembershipBlock.tpl b/civicrm/templates/CRM/Contribute/Form/Contribution/MembershipBlock.tpl
index b77d0ecd70..aaa68dad04 100644
--- a/civicrm/templates/CRM/Contribute/Form/Contribution/MembershipBlock.tpl
+++ b/civicrm/templates/CRM/Contribute/Form/Contribution/MembershipBlock.tpl
@@ -73,14 +73,14 @@
         });
       </script>
     {/literal}
-    {elseif $lineItem and $priceSetID AND !$is_quick_config}
-      {assign var="totalAmount" value=$amount}
-      <div class="header-dark">
-        {ts}Membership Fee{/ts}
-      </div>
-      <div class="display-block">
-        {include file="CRM/Price/Page/LineItem.tpl" context="Membership"}
-      </div>
+{elseif $membershipBlock and $lineItem and $priceSetID AND !$is_quick_config}
+  {assign var="totalAmount" value=$amount}
+  <div class="header-dark">
+    {ts}Membership Fee{/ts}
+  </div>
+  <div class="display-block">
+    {include file="CRM/Price/Page/LineItem.tpl" context="Membership"}
+  </div>
 {elseif $membershipBlock AND !$is_quick_config}
   <div id="membership" class="crm-group membership-group">
     {if $context EQ "makeContribution"}
diff --git a/civicrm/vendor/autoload.php b/civicrm/vendor/autoload.php
index 6b20ac8fec..5ba656ee61 100644
--- a/civicrm/vendor/autoload.php
+++ b/civicrm/vendor/autoload.php
@@ -4,4 +4,4 @@
 
 require_once __DIR__ . '/composer/autoload_real.php';
 
-return ComposerAutoloaderInitcbcf8cf27895b1c1945745158097c516::getLoader();
+return ComposerAutoloaderInit1b9e192d5e7805a9da3e259135567f71::getLoader();
diff --git a/civicrm/vendor/composer/autoload_real.php b/civicrm/vendor/composer/autoload_real.php
index 6e934bd342..eb64d0b2aa 100644
--- a/civicrm/vendor/composer/autoload_real.php
+++ b/civicrm/vendor/composer/autoload_real.php
@@ -2,7 +2,7 @@
 
 // autoload_real.php @generated by Composer
 
-class ComposerAutoloaderInitcbcf8cf27895b1c1945745158097c516
+class ComposerAutoloaderInit1b9e192d5e7805a9da3e259135567f71
 {
     private static $loader;
 
@@ -24,9 +24,9 @@ class ComposerAutoloaderInitcbcf8cf27895b1c1945745158097c516
 
         require __DIR__ . '/platform_check.php';
 
-        spl_autoload_register(array('ComposerAutoloaderInitcbcf8cf27895b1c1945745158097c516', 'loadClassLoader'), true, true);
+        spl_autoload_register(array('ComposerAutoloaderInit1b9e192d5e7805a9da3e259135567f71', 'loadClassLoader'), true, true);
         self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
-        spl_autoload_unregister(array('ComposerAutoloaderInitcbcf8cf27895b1c1945745158097c516', 'loadClassLoader'));
+        spl_autoload_unregister(array('ComposerAutoloaderInit1b9e192d5e7805a9da3e259135567f71', 'loadClassLoader'));
 
         $includePaths = require __DIR__ . '/include_paths.php';
         $includePaths[] = get_include_path();
@@ -36,7 +36,7 @@ class ComposerAutoloaderInitcbcf8cf27895b1c1945745158097c516
         if ($useStaticLoader) {
             require __DIR__ . '/autoload_static.php';
 
-            call_user_func(\Composer\Autoload\ComposerStaticInitcbcf8cf27895b1c1945745158097c516::getInitializer($loader));
+            call_user_func(\Composer\Autoload\ComposerStaticInit1b9e192d5e7805a9da3e259135567f71::getInitializer($loader));
         } else {
             $map = require __DIR__ . '/autoload_namespaces.php';
             foreach ($map as $namespace => $path) {
@@ -57,12 +57,12 @@ class ComposerAutoloaderInitcbcf8cf27895b1c1945745158097c516
         $loader->register(true);
 
         if ($useStaticLoader) {
-            $includeFiles = Composer\Autoload\ComposerStaticInitcbcf8cf27895b1c1945745158097c516::$files;
+            $includeFiles = Composer\Autoload\ComposerStaticInit1b9e192d5e7805a9da3e259135567f71::$files;
         } else {
             $includeFiles = require __DIR__ . '/autoload_files.php';
         }
         foreach ($includeFiles as $fileIdentifier => $file) {
-            composerRequirecbcf8cf27895b1c1945745158097c516($fileIdentifier, $file);
+            composerRequire1b9e192d5e7805a9da3e259135567f71($fileIdentifier, $file);
         }
 
         return $loader;
@@ -74,7 +74,7 @@ class ComposerAutoloaderInitcbcf8cf27895b1c1945745158097c516
  * @param string $file
  * @return void
  */
-function composerRequirecbcf8cf27895b1c1945745158097c516($fileIdentifier, $file)
+function composerRequire1b9e192d5e7805a9da3e259135567f71($fileIdentifier, $file)
 {
     if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
         $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
diff --git a/civicrm/vendor/composer/autoload_static.php b/civicrm/vendor/composer/autoload_static.php
index 6854d3a227..06e32adf4f 100644
--- a/civicrm/vendor/composer/autoload_static.php
+++ b/civicrm/vendor/composer/autoload_static.php
@@ -4,7 +4,7 @@
 
 namespace Composer\Autoload;
 
-class ComposerStaticInitcbcf8cf27895b1c1945745158097c516
+class ComposerStaticInit1b9e192d5e7805a9da3e259135567f71
 {
     public static $files = array (
         'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php',
@@ -729,11 +729,11 @@ class ComposerStaticInitcbcf8cf27895b1c1945745158097c516
     public static function getInitializer(ClassLoader $loader)
     {
         return \Closure::bind(function () use ($loader) {
-            $loader->prefixLengthsPsr4 = ComposerStaticInitcbcf8cf27895b1c1945745158097c516::$prefixLengthsPsr4;
-            $loader->prefixDirsPsr4 = ComposerStaticInitcbcf8cf27895b1c1945745158097c516::$prefixDirsPsr4;
-            $loader->prefixesPsr0 = ComposerStaticInitcbcf8cf27895b1c1945745158097c516::$prefixesPsr0;
-            $loader->fallbackDirsPsr0 = ComposerStaticInitcbcf8cf27895b1c1945745158097c516::$fallbackDirsPsr0;
-            $loader->classMap = ComposerStaticInitcbcf8cf27895b1c1945745158097c516::$classMap;
+            $loader->prefixLengthsPsr4 = ComposerStaticInit1b9e192d5e7805a9da3e259135567f71::$prefixLengthsPsr4;
+            $loader->prefixDirsPsr4 = ComposerStaticInit1b9e192d5e7805a9da3e259135567f71::$prefixDirsPsr4;
+            $loader->prefixesPsr0 = ComposerStaticInit1b9e192d5e7805a9da3e259135567f71::$prefixesPsr0;
+            $loader->fallbackDirsPsr0 = ComposerStaticInit1b9e192d5e7805a9da3e259135567f71::$fallbackDirsPsr0;
+            $loader->classMap = ComposerStaticInit1b9e192d5e7805a9da3e259135567f71::$classMap;
 
         }, null, ClassLoader::class);
     }
diff --git a/civicrm/vendor/composer/installed.php b/civicrm/vendor/composer/installed.php
index 40fef08ff8..dad30a74c8 100644
--- a/civicrm/vendor/composer/installed.php
+++ b/civicrm/vendor/composer/installed.php
@@ -5,7 +5,7 @@
         'type' => 'library',
         'install_path' => __DIR__ . '/../../',
         'aliases' => array(),
-        'reference' => 'da223dafffa4a8b232f9551b1d5662f875a2ec3b',
+        'reference' => 'b789bc645d5ad62ec0a565b582ca108a2e0367da',
         'name' => 'civicrm/civicrm-core',
         'dev' => true,
     ),
@@ -43,7 +43,7 @@
             'type' => 'library',
             'install_path' => __DIR__ . '/../../',
             'aliases' => array(),
-            'reference' => 'da223dafffa4a8b232f9551b1d5662f875a2ec3b',
+            'reference' => 'b789bc645d5ad62ec0a565b582ca108a2e0367da',
             'dev_requirement' => false,
         ),
         'civicrm/civicrm-cxn-rpc' => array(
diff --git a/civicrm/xml/version.xml b/civicrm/xml/version.xml
index 66204f745c..53a0d83653 100644
--- a/civicrm/xml/version.xml
+++ b/civicrm/xml/version.xml
@@ -1,4 +1,4 @@
 <?xml version="1.0" encoding="iso-8859-1" ?>
 <version>
-  <version_no>5.62.0</version_no>
+  <version_no>5.62.1</version_no>
 </version>
diff --git a/wp-rest/Controller/Url.php b/wp-rest/Controller/Url.php
index 0c8b09106d..e2e603b666 100644
--- a/wp-rest/Controller/Url.php
+++ b/wp-rest/Controller/Url.php
@@ -55,7 +55,7 @@ class Url extends Base {
     $params = apply_filters('civi_wp_rest/controller/url/params', $this->get_formatted_params($request), $request);
 
     // Track URL.
-    $url = \CRM_Mailing_Event_BAO_MailingEventClickThrough::track($params['queue_id'], $params['url_id']);
+    $url = \CRM_Mailing_Event_BAO_MailingEventTrackableURLOpen::track($params['queue_id'], $params['url_id']);
 
     /**
      * Filter URL.
-- 
GitLab