wc_get_screen_ids()WC 1.0

Get all WooCommerce screen ids.

Хуки из функции

Возвращает

Массив.

Использование

wc_get_screen_ids();

Код wc_get_screen_ids() WC 8.7.0

function wc_get_screen_ids() {
	$wc_screen_id = 'woocommerce';
	$screen_ids   = array(
		'toplevel_page_' . $wc_screen_id,
		$wc_screen_id . '_page_wc-orders',
		$wc_screen_id . '_page_wc-reports',
		$wc_screen_id . '_page_wc-shipping',
		$wc_screen_id . '_page_wc-settings',
		$wc_screen_id . '_page_wc-status',
		$wc_screen_id . '_page_wc-addons',
		'toplevel_page_wc-reports',
		'product_page_product_attributes',
		'product_page_product_exporter',
		'product_page_product_importer',
		'product_page_product-reviews',
		'edit-product',
		'product',
		'edit-shop_coupon',
		'shop_coupon',
		'edit-product_cat',
		'edit-product_tag',
		'profile',
		'user-edit',
	);

	foreach ( wc_get_order_types() as $type ) {
		$screen_ids[] = $type;
		$screen_ids[] = 'edit-' . $type;
		$screen_ids[] = wc_get_page_screen_id( $type );
	}

	$attributes = wc_get_attribute_taxonomies();

	if ( $attributes ) {
		foreach ( $attributes as $attribute ) {
			$screen_ids[] = 'edit-' . wc_attribute_taxonomy_name( $attribute->attribute_name );
		}
	}

	/* phpcs:disable WooCommerce.Commenting.CommentHooks.MissingHookComment */
	return apply_filters( 'woocommerce_screen_ids', $screen_ids );
	/* phpcs: enable */
}