mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Use wc order update meta data intead of wp function
This commit is contained in:
parent
beebb862da
commit
99aa80c3ec
2 changed files with 4 additions and 2 deletions
|
@ -248,7 +248,8 @@ class PayUponInvoice {
|
|||
$wc_order->save_meta_data();
|
||||
$paypal_fee = $breakdown->paypal_fee();
|
||||
if ( $paypal_fee ) {
|
||||
update_post_meta( $wc_order->get_id(), 'PayPal Transaction Key', $paypal_fee->value() );
|
||||
$wc_order->update_meta_data( 'PayPal Transaction Key', $paypal_fee->value() );
|
||||
$wc_order->save_meta_data();
|
||||
}
|
||||
}
|
||||
} catch ( RuntimeException $exception ) {
|
||||
|
|
|
@ -90,7 +90,8 @@ class WCGatewayModule implements ModuleInterface {
|
|||
$wc_order->save_meta_data();
|
||||
$paypal_fee = $breakdown->paypal_fee();
|
||||
if ( $paypal_fee ) {
|
||||
update_post_meta( $wc_order->get_id(), 'PayPal Transaction Key', $paypal_fee->value() );
|
||||
$wc_order->update_meta_data( 'PayPal Transaction Key', $paypal_fee->value() );
|
||||
$wc_order->save_meta_data();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue