WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
класс не описан

Automattic\WooCommerce\Admin\Features\OnboardingTasks\Tasks

StoreDetails{} WC 1.0

Store Details Task

Хуков нет.

Возвращает

null. Ничего.

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

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

Методы

  1. get_action_url()
  2. get_content()
  3. get_id()
  4. get_parent_id()
  5. get_time()
  6. get_title()
  7. is_complete()

Код StoreDetails{} WC 6.1.0

class StoreDetails extends Task {
	/**
	 * ID.
	 *
	 * @return string
	 */
	public function get_id() {
		return 'store_details';
	}

	/**
	 * Parent ID.
	 *
	 * @return string
	 */
	public function get_parent_id() {
		return 'setup';
	}

	/**
	 * Title.
	 *
	 * @return string
	 */
	public function get_title() {
		return __( 'Store details', 'woocommerce' );
	}

	/**
	 * Content.
	 *
	 * @return string
	 */
	public function get_content() {
		return __(
			'Your store address is required to set the origin country for shipping, currencies, and payment options.',
			'woocommerce'
		);
	}

	/**
	 * Time.
	 *
	 * @return string
	 */
	public function get_time() {
		return __( '4 minutes', 'woocommerce' );
	}

	/**
	 * Time.
	 *
	 * @return string
	 */
	public function get_action_url() {
		return '/setup-wizard';
	}

	/**
	 * Task completion.
	 *
	 * @return bool
	 */
	public function is_complete() {
		$profiler_data = get_option( Onboarding::PROFILE_DATA_OPTION, array() );
		return isset( $profiler_data['completed'] ) && true === $profiler_data['completed'];
	}
}