mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-08-30 05:00:51 +08:00
Set order phone number if exists in request
This commit is contained in:
parent
b57567cf84
commit
93b483f9e1
1 changed files with 6 additions and 0 deletions
|
@ -215,6 +215,12 @@ class PayUponInvoiceGateway extends WC_Payment_Gateway {
|
|||
}
|
||||
}
|
||||
|
||||
$phone_number = filter_input( INPUT_POST, 'billing_phone', FILTER_SANITIZE_STRING ) ?? '';
|
||||
if ( $phone_number ) {
|
||||
$wc_order->set_billing_phone( $phone_number );
|
||||
$wc_order->save();
|
||||
}
|
||||
|
||||
$wc_order->update_status( 'on-hold', __( 'Awaiting Pay upon Invoice payment.', 'woocommerce-paypal-payments' ) );
|
||||
$purchase_unit = $this->purchase_unit_factory->from_wc_order( $wc_order );
|
||||
$payment_source = $this->payment_source_factory->from_wc_order( $wc_order, $birth_date );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue