Update class-wc-gateway-paypal-response.php
This commit is contained in:
parent
ae4eba45ec
commit
60ac27ba3e
|
@ -63,12 +63,10 @@ abstract class WC_Gateway_Paypal_Response {
|
|||
* @param string $note Payment note.
|
||||
*/
|
||||
protected function payment_complete( $order, $txn_id = '', $note = '' ) {
|
||||
if ( ! $order->get_meta( '_paypal_payment_completed', true ) ) {
|
||||
if ( ! $order->has_status( array( 'processing', 'completed' ) ) ) {
|
||||
$order->add_order_note( $note );
|
||||
$order->payment_complete( $txn_id );
|
||||
WC()->cart->empty_cart();
|
||||
$order->update_meta_data( '_paypal_payment_completed', 'yes' );
|
||||
$order->save();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue