# stripe/4.7.7/src/Help/HelpServiceProvider.php

Stripe Payment Forms by WP Simple Pay – Accept Credit Card Payments + Subscriptions with Stripe, version 4.7.7. 83 lines.

- Page: https://pluginprobe.com/plugins/stripe/4.7.7/code/src/Help/HelpServiceProvider.php
- Raw: https://pluginprobe.com/plugins/stripe/4.7.7/raw/src/Help/HelpServiceProvider.php
- Modified: 2023-01-24T17:31:42+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/stripe/4.7.7/code/src/Help/HelpServiceProvider.php#L10-L20`.

```php
<?php
/**
 * Help: Service provider
 *
 * @package SimplePay
 * @subpackage Core
 * @copyright Copyright (c) 2022, Sandhills Development, LLC
 * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
 * @since 4.4.6
 */

namespace SimplePay\Core\Help;

use SimplePay\Core\AbstractPluginServiceProvider;

/**
 * HelpServiceProvider class.
 *
 * @since 4.4.6
 */
class HelpServiceProvider extends AbstractPluginServiceProvider {

	/*
	 * {@inheritdoc}
	 */
	public function get_services() {
		return array(
			'admin-help-docs-context',
		);
	}

	/**
	 * {@inheritdoc}
	 */
	public function get_subscribers() {
		return array(
			'admin-help-docs-importer',
			'admin-help-ui',
		);
	}

	/**
	 * {@inheritdoc}
	 */
	public function register() {
		$container = $this->getContainer();

		// Docs importer.
		$container->share(
			'admin-help-docs-importer',
			HelpDocsImporter::class
		)
			->withArgument( $this->get_remote_api_url() )
			->withArgument( $container->get( 'scheduler' ) );

		// Context.
		$container->share(
			'admin-help-docs-context',
			HelpDocsContext::class
		);

		// UI.
		$container->share( 'admin-help-ui', HelpUi::class )
			->withArgument( $container->get( 'admin-help-docs-context' ) );
	}

	/**
	 * Returns the API URL for remote doc articles to import.
	 *
	 * @since 4.4.6
	 *
	 * @return string
	 */
	private function get_remote_api_url() {
		if ( defined( 'SIMPAY_HELP_DOCS_API_URL' ) ) {
			return SIMPAY_HELP_DOCS_API_URL;
		}

		return 'https://wpsimplepay.com/wp-content/docs.json';
	}

}

```
