WC_Gateway_Paypal_IPN_Handler::payment_status_failedprotectedWC 1.0

Handle a failed payment.

Method of the class: WC_Gateway_Paypal_IPN_Handler{}

No Hooks.

Returns

null. Nothing (null).

Usage

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

WC_Gateway_Paypal_IPN_Handler::payment_status_failed() code WC 10.8.1

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