Automattic\WooCommerce\Admin\Features\OnboardingTasks\Tasks

ReviewShippingOptions{}WC 1.0

Review Shipping Options Task

No Hooks.

Usage

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

Methods

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

ReviewShippingOptions{} code WC 7.1.1

class ReviewShippingOptions extends Task {
	/**
	 * ID.
	 *
	 * @return string
	 */
	public function get_id() {
		return 'review-shipping';
	}

	/**
	 * Title.
	 *
	 * @return string
	 */
	public function get_title() {
		return __( 'Review shipping options', 'woocommerce' );
	}

	/**
	 * Content.
	 *
	 * @return string
	 */
	public function get_content() {
		return '';
	}

	/**
	 * Time.
	 *
	 * @return string
	 */
	public function get_time() {
		return '';
	}

	/**
	 * Task completion.
	 *
	 * @return bool
	 */
	public function is_complete() {
		return get_option( 'woocommerce_admin_reviewed_default_shipping_zones' ) === 'yes';
	}

	/**
	 * Task visibility.
	 *
	 * @return bool
	 */
	public function can_view() {
		return get_option( 'woocommerce_admin_created_default_shipping_zones' ) === 'yes';
	}

	/**
	 * Action URL.
	 *
	 * @return string
	 */
	public function get_action_url() {
		return admin_url( 'admin.php?page=wc-settings&tab=shipping' );
	}
}