Automattic\WooCommerce\Admin\API

ShippingPartnerSuggestions::should_displayprivateWC 1.0

Check if suggestions should be shown in the settings screen.

Method of the class: ShippingPartnerSuggestions{}

Returns

true|false.

Usage

// private - for code of main (parent) class only
$result = $this->should_display();

ShippingPartnerSuggestions::should_display() code WC 9.9.5

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 );
}