Commit 0e4320c8 authored by Vincent Mrose's avatar Vincent Mrose 💬
Browse files

Merge branch 'hotfix/checkout'

parents 5d5c7c81 1766b739
......@@ -59,19 +59,21 @@ class WC_Gateway_Hosted_Payments extends WC_Payment_Gateway
* Yes: The additional gender field will not be required
* No: The additional gender field will be added to checkout page
*/
if (!array_key_exists('billing_title', $fields['billing']) && !in_array('Anrede',
$fields['billing']['billing_title'])) {
$newBillingFields['billing_payco_gender'] = array(
'label' => __('Gender', 'upg'),
'type' => 'select',
'required' => 1,
'clear' => false,
'options' => array(
\Upg\Library\Request\Objects\Person::SALUTATIONMALE => __('Male', $this->id),
\Upg\Library\Request\Objects\Person::SALUTATIONFEMALE => __('Female', $this->id),
),
'priority' => 9,
);
if (!array_key_exists('billing_title', $fields['billing'])) {
if (!is_array($fields['billing']['billing_title']) ||
!in_array('Anrede', $fields['billing']['billing_title'])) {
$newBillingFields['billing_payco_gender'] = array(
'label' => __('Gender', 'upg'),
'type' => 'select',
'required' => 1,
'clear' => false,
'options' => array(
\Upg\Library\Request\Objects\Person::SALUTATIONMALE => __('Male', $this->id),
\Upg\Library\Request\Objects\Person::SALUTATIONFEMALE => __('Female', $this->id),
),
'priority' => 9,
);
}
}
$checkoutFields = $fields['billing'];
......
......@@ -2,7 +2,7 @@
/**
* Plugin Name: CrefoPay für WooCommerce
* Description: Die Komplettlösung für Ihre Zahlungsabwicklung.
* Version: 2.4.1
* Version: 2.4.2
* Author: CrefoPayment GmbH & Co. KG
* Text Domain: upg
*/
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment