- //unset the billing parameters if it is pay later mode
- //to avoid creation of billing location
- // @todo - note that elsewhere we don't unset these - we simply make
- // a sensible decision about including them when building the form
- // and if they are submitted we handle them. Check out abstractEditPaymentForm.
- if ($isPayLater && !$this->_isBillingAddressRequiredForPayLater) {
- $billingFields = array(
- 'billing_first_name',
- 'billing_middle_name',
- 'billing_last_name',
- "billing_street_address-{$this->_bltID}",
- "billing_city-{$this->_bltID}",
- "billing_state_province-{$this->_bltID}",
- "billing_state_province_id-{$this->_bltID}",
- "billing_postal_code-{$this->_bltID}",
- "billing_country-{$this->_bltID}",
- "billing_country_id-{$this->_bltID}",
- );
-
- foreach ($billingFields as $value) {
- unset($params[$value]);
- unset($fields[$value]);
- }
- }
-