Merge pull request #21200 from madeincosmos/fix/21199

Enable PDT handling for custom pending payment statuses
This commit is contained in:
Claudiu Lodromanean 2018-08-28 10:47:53 -07:00 committed by GitHub
commit e1b1aca807
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -93,7 +93,7 @@ class WC_Gateway_Paypal_PDT_Handler extends WC_Gateway_Paypal_Response {
$transaction = wc_clean( wp_unslash( $_REQUEST['tx'] ) ); // WPCS: input var ok, CSRF ok, sanitization ok. $transaction = wc_clean( wp_unslash( $_REQUEST['tx'] ) ); // WPCS: input var ok, CSRF ok, sanitization ok.
$order = $this->get_paypal_order( $order_id ); $order = $this->get_paypal_order( $order_id );
if ( ! $order || ! $order->has_status( 'pending' ) ) { if ( ! $order || ! $order->needs_payment() ) {
return false; return false;
} }