WC_Marketplace_Suggestions::show_suggestions_for_screen()public staticWC 1.0

Should suggestions be displayed?

Method of the class: WC_Marketplace_Suggestions{}

No Hooks.

Return

true|false.

Usage

$result = WC_Marketplace_Suggestions::show_suggestions_for_screen( $screen_id );
$screen_id(string) (required)
The current admin screen.

WC_Marketplace_Suggestions::show_suggestions_for_screen() code WC 8.7.0

public static function show_suggestions_for_screen( $screen_id ) {
	// We only show suggestions on certain admin screens.
	if ( ! in_array( $screen_id, array( 'edit-product', 'edit-shop_order', 'product', wc_get_page_screen_id( 'shop-order' ) ), true ) ) {
		return false;
	}

	return self::allow_suggestions();
}