WC_Payment_Gateway::can_refund_order()publicWC 1.0

Can the order be refunded via this gateway?

Should be extended by gateways to do their own checks.

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

Хуков нет.


true|false. If false, the automatic refund button is hidden in the UI.


$WC_Payment_Gateway = new WC_Payment_Gateway();
$WC_Payment_Gateway->can_refund_order( $order );
$order(WC_Order) (обязательный)
Order object.

Код WC_Payment_Gateway::can_refund_order() WC 8.6.1

public function can_refund_order( $order ) {
	return $order && $this->supports( 'refunds' );