WC_Payment_Gateway::process_refund()publicWC 1.0

Process refund.

If the gateway declares 'refunds' support, this will allow it to refund. a passed in amount.

Метод класса: WC_Payment_Gateway{}

Хуков нет.

Возвращает

true|false|\WP_Error. True or false based on success, or a WP_Error object.

Использование

$WC_Payment_Gateway = new WC_Payment_Gateway();
$WC_Payment_Gateway->process_refund( $order_id, $amount, $reason );
$order_id(int) (обязательный)
Order ID.
$amount(float|null)
Refund amount.
По умолчанию: null
$reason(строка)
Refund reason.
По умолчанию: ''

Код WC_Payment_Gateway::process_refund() WC 8.7.0

public function process_refund( $order_id, $amount = null, $reason = '' ) {
	return false;
}