WordPress at Your Fingertips
function is not described

WC_Gateway_Paypal_IPN_Handler::payment_status_reversed() protected WC 1.0

Handle a reversal.

{} It's a method of the class: WC_Gateway_Paypal_IPN_Handler{}

No Hooks.

Return

null. Nothing.

Usage

// protected - for code of main (parent) or child class
$result = $this->payment_status_reversed( $order, $posted );
$order(WC_Order) (required)
Order object.
$posted(array) (required)
Posted data.

Code of WC_Gateway_Paypal_IPN_Handler::payment_status_reversed() WC 5.6.0

protected function payment_status_reversed( $order, $posted ) {
	/* translators: %s: payment status. */
	$order->update_status( 'on-hold', sprintf( __( 'Payment %s via IPN.', 'woocommerce' ), wc_clean( $posted['payment_status'] ) ) );

	$this->send_ipn_email_notification(
		/* translators: %s: order link. */
		sprintf( __( 'Payment for order %s reversed', 'woocommerce' ), '<a class="link" href="' . esc_url( $order->get_edit_order_url() ) . '">' . $order->get_order_number() . '</a>' ),
		/* translators: %1$s: order ID, %2$s: reason code. */
		sprintf( __( 'Order #%1$s has been marked on-hold due to a reversal - PayPal reason code: %2$s', 'woocommerce' ), $order->get_order_number(), wc_clean( $posted['reason_code'] ) )
	);
}