WordPress at Your Fingertips
function is not described

WC_Queue::validate_instance() protected WC 1.0

Enforce a WC_Queue_Interface

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

No Hooks.

Return

WC_Queue_Interface.

Usage

$result = WC_Queue::validate_instance( $instance );
$instance(WC_Queue_Interface) (required)
Instance class.

Code of WC_Queue::validate_instance() WC 5.9.0

protected static function validate_instance( $instance ) {
	if ( false === ( $instance instanceof WC_Queue_Interface ) ) {
		$default_class = self::$default_cass;
		/* translators: %s: Default class name */
		wc_doing_it_wrong( __FUNCTION__, sprintf( __( 'The class attached to the "woocommerce_queue_class" does not implement the WC_Queue_Interface interface. The default %s class will be used instead.', 'woocommerce' ), $default_class ), '3.5.0' );
		$instance = new $default_class();
	}

	return $instance;
}