@@ 557-562 (lines=6) @@ | ||
554 | /* translators: 1) The URL to the order. 2) The reason type. */ |
|
555 | $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 ); |
|
556 | ||
557 | if ( apply_filters( 'wc_stripe_webhook_review_change_order_status', true, $order, $notification ) ) { |
|
558 | $order->update_status( 'on-hold', $message ); |
|
559 | } else { |
|
560 | $order->add_order_note( $message ); |
|
561 | } |
|
562 | } |
|
563 | ||
564 | /** |
|
565 | * Process webhook reviews that are closed. i.e Radar. |
|
@@ 591-595 (lines=5) @@ | ||
588 | $message = sprintf( __( 'The opened review for this order is now closed. Reason: (%s)', 'woocommerce-gateway-stripe' ), $notification->data->object->reason ); |
|
589 | ||
590 | if ( 'on-hold' === $order->get_status() ) { |
|
591 | if ( apply_filters( 'wc_stripe_webhook_review_change_order_status', true, $order, $notification ) ) { |
|
592 | $order->update_status( 'processing', $message ); |
|
593 | } else { |
|
594 | $order->add_order_note( $message ); |
|
595 | } |
|
596 | } else { |
|
597 | $order->add_order_note( $message ); |
|
598 | } |