Skip to content

Commit

Permalink
PIWOO-441 phone number can be prepopulated in block preview
Browse files Browse the repository at this point in the history
  • Loading branch information
mmaymo committed Mar 19, 2024
1 parent d0e3405 commit dedfade
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion mollie-payments-for-woocommerce.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: Mollie Payments for WooCommerce
* Plugin URI: https://www.mollie.com
* Description: Accept payments in WooCommerce with the official Mollie plugin
* Version: 7.6.0
* Version: 7.5.2-beta
* Author: Mollie
* Author URI: https://www.mollie.com
* Requires at least: 5.0
Expand Down
4 changes: 4 additions & 0 deletions src/Gateway/GatewayModule.php
Original file line number Diff line number Diff line change
Expand Up @@ -893,6 +893,10 @@ public function addPhoneWhenRest($arrayContext)
$phoneMandatoryGateways = ['mollie_wc_gateway_in3', 'mollie_wc_gateway_bancomatpay'];
$paymentMethod = $context->payment_data['payment_method'];
if (in_array($paymentMethod, $phoneMandatoryGateways)) {
$billingPhone = $context->order->get_billing_phone();
if (!empty($billingPhone) && $this->isPhoneValid($billingPhone)) {
return;
}
$billingPhone = $context->payment_data['billing_phone'];
if ($billingPhone) {
$context->order->set_billing_phone($billingPhone);
Expand Down

0 comments on commit dedfade

Please sign in to comment.