Automattic\WooCommerce\Admin\API
ShippingPartnerSuggestions::should_display()
Check if suggestions should be shown in the settings screen.
Метод класса: ShippingPartnerSuggestions{}
Хуки из метода
Возвращает
true|false
.
Использование
// private - только в коде основоного (родительского) класса $result = $this->should_display();
Код ShippingPartnerSuggestions::should_display() ShippingPartnerSuggestions::should display WC 9.7.1
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 ); }