Add screen to WooCommerce screen IDs

add_filter( 'woocommerce_screen_ids','wpcb_add_screen_to_wc_screen_ids' );
if ( ! function_exists( 'wpcb_add_screen_to_wc_screen_ids' ) ) {
    /**
     * wpcb_add_screen_to_wc_screen_ids.
     *
     * @see https://wpcodebook.com/snippets/add-screen-to-woocommerce-screen-ids/
     */
    function wpcb_add_screen_to_wc_screen_ids( $screen_ids ) {
        $screen_ids[] = 'your-screen-id'; // to get your screen ID call `$your_screen = get_current_screen()`, then get `$your_screen->id`
        return $screen_ids;
    }
}

No comments yet.

Leave a Reply