WC_Gateway_Paypal_IPN_Handler::payment_status_failed()protectedWC 1.0

Handle a failed payment.

Method of the class: WC_Gateway_Paypal_IPN_Handler{}

No Hooks.

Return

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 8.7.0

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