WordPress at Your Fingertips
function is not described

WC_Payment_Gateway::can_refund_order() public WC 1.0

Can the order be refunded via this gateway?

Should be extended by gateways to do their own checks.

{} It's a 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.

Code of WC_Payment_Gateway::can_refund_order() WC 5.8.0

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