Automattic\WooCommerce\Admin\Overrides
OrderRefund::order_class_name()
Filter function to swap class WC_Order_Refund for this one in cases when it's suitable.
Method of the class: OrderRefund{}
No Hooks.
Return
String
.
Usage
$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.
OrderRefund::order_class_name() OrderRefund::order class name code WC 9.2.3
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; } }