|
@@ 495-500 (lines=6) @@
|
| 492 |
|
/* translators: 1) The URL to the order. 2) The reason type. */ |
| 493 |
|
$message = sprintf( __( 'A review has been opened for this order. Action is needed. Please go to your <a href="%1$s" title="Stripe Dashboard" target="_blank">Stripe Dashboard</a> to review the issue. Reason: (%2$s)', 'woocommerce-gateway-stripe' ), $this->get_transaction_url( $order ), $notification->data->object->reason ); |
| 494 |
|
|
| 495 |
|
if ( apply_filters( 'wc_stripe_webhook_review_change_order_status', true, $order, $notification ) ) { |
| 496 |
|
$order->update_status( 'on-hold', $message ); |
| 497 |
|
} else { |
| 498 |
|
$order->add_order_note( $message ); |
| 499 |
|
} |
| 500 |
|
} |
| 501 |
|
|
| 502 |
|
/** |
| 503 |
|
* Process webhook reviews that are closed. i.e Radar. |
|
@@ 520-524 (lines=5) @@
|
| 517 |
|
$message = sprintf( __( 'The opened review for this order is now closed. Reason: (%s)', 'woocommerce-gateway-stripe' ), $notification->data->object->reason ); |
| 518 |
|
|
| 519 |
|
if ( 'on-hold' === $order->get_status() ) { |
| 520 |
|
if ( apply_filters( 'wc_stripe_webhook_review_change_order_status', true, $order, $notification ) ) { |
| 521 |
|
$order->update_status( 'processing', $message ); |
| 522 |
|
} else { |
| 523 |
|
$order->add_order_note( $message ); |
| 524 |
|
} |
| 525 |
|
} else { |
| 526 |
|
$order->add_order_note( $message ); |
| 527 |
|
} |