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.

Method of the class: WC_Payment_Gateway{}

No Hooks.

Return

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

Usage

$WC_Payment_Gateway = new WC_Payment_Gateway();
$WC_Payment_Gateway->can_refund_order( $order );
$order(WC_Order) (required)
Order object.

WC_Payment_Gateway::can_refund_order() code WC 8.7.0

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