Merge pull request #19650 from tapashdatta/Enable-"Do-no-trade"-filter-1
[civicrm-core.git] / CRM / Member / Form.php
index b476a249a785f47610d3edaae0a047c6212eb6d5..85532438fd76bd206d1f1acf7b7c0ef985fe3a71 100644 (file)
@@ -478,6 +478,7 @@ class CRM_Member_Form extends CRM_Contribute_Form_AbstractEditPayment {
    * @param array $formValues
    */
   public function testSubmit(array $formValues): void {
+    $this->exportedValues = $formValues;
     $this->setContextVariables($formValues);
     $this->_memType = $formValues['membership_type_id'][1];
     $this->_params = $formValues;
@@ -502,4 +503,19 @@ class CRM_Member_Form extends CRM_Contribute_Form_AbstractEditPayment {
     ];
   }
 
+  /**
+   * Get the currency in use.
+   *
+   * This just defaults to getting the default currency
+   * as other currencies are not supported on the membership
+   * forms at the moment.
+   *
+   * @param array $submittedValues
+   *
+   * @return string
+   */
+  public function getCurrency($submittedValues = []): string {
+    return CRM_Core_Config::singleton()->defaultCurrency;
+  }
+
 }