Automattic\WooCommerce\Internal\DependencyManagement\ServiceProviders

OrderAttributionServiceProvider{}WC 8.5.0

Class OrderAttributionServiceProvider

No Hooks.

Usage

$OrderAttributionServiceProvider = new OrderAttributionServiceProvider();
// use class methods

Methods

  1. public register()

Changelog

Since 8.5.0 Introduced.

OrderAttributionServiceProvider{} code WC 9.5.1

class OrderAttributionServiceProvider extends AbstractInterfaceServiceProvider {

	/**
	 * The classes/interfaces that are serviced by this service provider.
	 *
	 * @var array
	 */
	protected $provides = array(
		OrderAttributionController::class,
		OrderAttributionBlocksController::class,
		WPConsentAPI::class,
	);

	/**
	 * Register the classes.
	 */
	public function register() {
		$this->share_with_implements_tags( WPConsentAPI::class );
		$this->share_with_implements_tags( OrderAttributionController::class )
			->addArguments(
				array(
					LegacyProxy::class,
					FeaturesController::class,
					WPConsentAPI::class,
				)
			);
		$this->share_with_implements_tags( OrderAttributionBlocksController::class )
			->addArguments(
				array(
					StoreApi::container()->get( ExtendSchema::class ),
					FeaturesController::class,
					OrderAttributionController::class,
				)
			);
	}
}