Automattic\WooCommerce\Admin\Features\ShippingPartnerSuggestions

ShippingPartnerSuggestions::get_specs_from_datasource()publicWC 1.0

Метод класса: ShippingPartnerSuggestions{}

Возвращает

null. Ничего (null).

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

$ShippingPartnerSuggestions = new ShippingPartnerSuggestions();
$ShippingPartnerSuggestions->;

Код ShippingPartnerSuggestions::get_specs_from_datasource() WC 8.7.0

	/**
	 * Get specs or fetch remotely if they don't exist.
	 */
	public static function get_specs() {
		if ( 'no' === get_option( 'woocommerce_show_marketplace_suggestions', 'yes' ) ) {
			/**
			 * It can be used to modify shipping partner suggestions spec.
			 *
			 * @since 7.4.1
			 */
			return apply_filters( 'woocommerce_admin_shipping_partner_suggestions_specs', DefaultShippingPartners::get_all() );
		}
		$specs = ShippingPartnerSuggestionsDataSourcePoller::get_instance()->get_specs_from_data_sources();

		// Fetch specs if they don't yet exist.
		if ( false === $specs || ! is_array( $specs ) || 0 === count( $specs ) ) {
			/**
			 * It can be used to modify shipping partner suggestions spec.
			 *
			 * @since 7.4.1
			 */
			return apply_filters( 'woocommerce_admin_shipping_partner_suggestions_specs', DefaultShippingPartners::get_all() );
		}

		/**
		 * It can be used to modify shipping partner suggestions spec.
		 *