WordPress at a glance
function is not described


OrderRefund::order_class_name() public WC 1.0

Filter function to swap class WC_Order_Refund for this one in cases when it's suitable.

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

No Hooks.


String. Nothing.


$result = OrderRefund::order_class_name( $classname, $order_type, $order_id );
$classname(string) (required)
Name of the class to be created.
$order_type(string) (required)
Type of order object to be created.
$order_id(number) (required)
Order id to create.

Code of OrderRefund::order_class_name() WC 5.3.0

public static function order_class_name( $classname, $order_type, $order_id ) {
	// @todo - Only substitute class when necessary (during sync).
	if ( 'WC_Order_Refund' === $classname ) {
		return '\Automattic\WooCommerce\Admin\Overrides\OrderRefund';
	} else {
		return $classname;