HPOS Order Table – Internal Name (Nickname) Column

// 1. Add “Internal Name” column after the Order Number column in HPOS Orders Table add_filter(‘woocommerce_shop_order_list_table_columns’, function($columns) { $new_columns = []; foreach ($columns as $key => $label) { $new_columns[$key] = $label; if ($key === ‘order_number’) { // Insert custom column…Continue reading

HPOS Order Table – Internal Name (Nickname) Column

// 1. Add “Internal Name” column after the Order Number column in HPOS Orders Table add_filter(‘woocommerce_shop_order_list_table_columns’, function($columns) { $new_columns = []; foreach ($columns as $key => $label) { $new_columns[$key] = $label; if ($key === ‘order_number’) { // Insert custom column…Continue reading

Legacy Order Table – Internal Name (Nickname) Column

if ( function_exists(‘wc_get_container’) && ! wc_get_container()->get(\Automattic\WooCommerce\Internal\DataStores\Orders\CustomOrdersTableController::class)->custom_orders_table_usage_is_enabled() ) { // LEGACY ORDER TABLE SNIPPET HERE add_filter(‘manage_edit-shop_order_columns’, function($columns) { $new_columns = []; foreach ($columns as $key => $label) { $new_columns[$key] = $label; if ($key === ‘order_number’) { $new_columns[‘internal_name’] = ‘Internal Name’; }…Continue reading

Duplicate Menus

// Function to duplicate a menu function duplicate_menu_action() { // Check if the action is to duplicate a menu if (isset($_GET[‘action’]) && $_GET[‘action’] === ‘duplicate_menu’ && isset($_GET[‘menu_id’])) { // Verify the user has the required capability if (!current_user_can(‘edit_theme_options’)) { wp_die(__(‘You…Continue reading