mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Replace wp update post meta to wc update meta
This commit is contained in:
parent
37d5cae924
commit
5e42704dbc
5 changed files with 19 additions and 7 deletions
|
@ -277,7 +277,8 @@ class CardButtonGateway extends \WC_Payment_Gateway {
|
|||
if ( $this->subscription_helper->has_subscription( $order_id ) && $this->subscription_helper->is_subscription_change_payment() ) {
|
||||
$saved_paypal_payment = filter_input( INPUT_POST, 'saved_paypal_payment', FILTER_SANITIZE_STRING );
|
||||
if ( $saved_paypal_payment ) {
|
||||
update_post_meta( $order_id, 'payment_token_id', $saved_paypal_payment );
|
||||
$wc_order->update_meta_data( 'payment_token_id', $saved_paypal_payment );
|
||||
$wc_order->save();
|
||||
|
||||
return $this->handle_payment_success( $wc_order );
|
||||
}
|
||||
|
|
|
@ -425,7 +425,8 @@ class PayPalGateway extends \WC_Payment_Gateway {
|
|||
if ( $this->subscription_helper->has_subscription( $order_id ) && $this->subscription_helper->is_subscription_change_payment() ) {
|
||||
$saved_paypal_payment = filter_input( INPUT_POST, 'saved_paypal_payment', FILTER_SANITIZE_STRING );
|
||||
if ( $saved_paypal_payment ) {
|
||||
update_post_meta( $order_id, 'payment_token_id', $saved_paypal_payment );
|
||||
$wc_order->update_meta_data( 'payment_token_id', $saved_paypal_payment );
|
||||
$wc_order->save();
|
||||
|
||||
return $this->handle_payment_success( $wc_order );
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue