@@ 549-554 (lines=6) @@ | ||
546 | /* translators: 1) The URL to the order. 2) The reason type. */ |
|
547 | $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 ); |
|
548 | ||
549 | if ( apply_filters( 'wc_stripe_webhook_review_change_order_status', true, $order, $notification ) ) { |
|
550 | $order->update_status( 'on-hold', $message ); |
|
551 | } else { |
|
552 | $order->add_order_note( $message ); |
|
553 | } |
|
554 | } |
|
555 | ||
556 | /** |
|
557 | * Process webhook reviews that are closed. i.e Radar. |
|
@@ 574-578 (lines=5) @@ | ||
571 | $message = sprintf( __( 'The opened review for this order is now closed. Reason: (%s)', 'woocommerce-gateway-stripe' ), $notification->data->object->reason ); |
|
572 | ||
573 | if ( 'on-hold' === $order->get_status() ) { |
|
574 | if ( apply_filters( 'wc_stripe_webhook_review_change_order_status', true, $order, $notification ) ) { |
|
575 | $order->update_status( 'processing', $message ); |
|
576 | } else { |
|
577 | $order->add_order_note( $message ); |
|
578 | } |
|
579 | } else { |
|
580 | $order->add_order_note( $message ); |
|
581 | } |