Setup_Status::get_current_status()

Summary

Get the current status of the store. Results are cached in a transient for up to 10 minutes.


Return

(array)


Source

File: src/BigCommerce/Merchant/Setup_Status.php

	public function get_current_status() {
		$cache = get_transient( self::STATUS_CACHE );

		if ( ! empty( $cache ) && is_array( $cache ) ) {
			return $cache;
		}

		$status = [
			'shipping_zones'   => $this->get_shipping_zone_count(),
			'shipping_methods' => $this->get_shipping_method_count(),
			'tax_classes'      => $this->get_tax_class_count(),
			'payment_methods'  => $this->get_payment_methods_count(),
			'ssl'              => $this->get_store_sitewidehttps_enabled(),
			'product_count'    => $this->get_product_count(),
			'domain'           => $this->get_domain(),
		];

		set_transient( self::STATUS_CACHE, $status, self::STATUS_CACHE_TTL );

		return $status;
	}


User Contributed Notes

You must log in before being able to contribute a note or feedback.