Automattic\WooCommerce\Admin\Features\PaymentGatewaySuggestions
Init::should_display()
Check if suggestions should be shown in the settings screen.
Метод класса: Init{}
Хуки из метода
Возвращает
true|false
.
Использование
$result = Init::should_display();
Код Init::should_display() Init::should display WC 7.7.0
public static function should_display() { if ( 'yes' === get_option( self::RECOMMENDED_PAYMENT_PLUGINS_DISMISS_OPTION, 'no' ) ) { return false; } if ( 'no' === get_option( 'woocommerce_show_marketplace_suggestions', 'yes' ) ) { return false; } return apply_filters( 'woocommerce_allow_payment_recommendations', true ); }