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.

{} It's a method of the class: WC_Payment_Gateway{}

No Hooks.


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) (required)
Order object.

Code of WC_Payment_Gateway::can_refund_order() WC 6.9.4

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