Automattic\WooCommerce\Admin\API

ShippingPartnerSuggestions::should_display()privateWC 1.0

Check if suggestions should be shown in the settings screen.

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

Возвращает

true|false.

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

// private - только в коде основоного (родительского) класса
$result = $this->should_display();

Код ShippingPartnerSuggestions::should_display() WC 8.7.0

private function should_display() {
	if ( 'no' === get_option( 'woocommerce_show_marketplace_suggestions', 'yes' ) ) {
		return false;
	}

	/**
	 * The return value can be controlled via woocommerce_allow_shipping_partner_suggestions filter.
	 *
	 * @since 7.4.1
	 */
	return apply_filters( 'woocommerce_allow_shipping_partner_suggestions', true );
}