Automattic\WooCommerce\Internal\DependencyManagement\ServiceProviders

AdminSuggestionsServiceProvider{}WC 1.0

Service provider for the suggestions controller classes in the Automattic\WooCommerce\Internal\Admin\Suggestions namespace.

Хуков нет.

Использование

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

Методы

  1. public register()

Код AdminSuggestionsServiceProvider{} WC 9.6.1

class AdminSuggestionsServiceProvider extends AbstractServiceProvider {
	/**
	 * List services provided by this class.
	 *
	 * @var string[]
	 */
	protected $provides = array(
		PaymentExtensionSuggestions::class,
		PaymentExtensionSuggestionIncentives::class,
		// The individual incentive providers are provided by the PaymentExtensionSuggestionIncentives class.
	);

	/**
	 * Registers services provided by this class.
	 *
	 * @return void
	 */
	public function register() {
		$this->share( PaymentExtensionSuggestionIncentives::class );
		$this->share( PaymentExtensionSuggestions::class )->addArgument( PaymentExtensionSuggestionIncentives::class );
	}
}