WC_Marketplace_Suggestions::show_suggestions_for_screen()
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() WC Marketplace Suggestions::show suggestions for screen code WC 9.5.1
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(); }