menu_position
is not used when you set show_in_menu
to a submenu.
to put your menu in last position there is 2 solutions.
The first is to change the menu construction priority like this :
add_action("admin_menu", function () {
remove_action('admin_menu', '_add_post_type_submenus');
add_action( 'admin_menu', '_add_post_type_submenus', 200);
// 200 to set it after the last element of WooCommerce which as the priority 70
}, 1);
With this, all custom post types are modified. If this is not what you want, the 2nd solution is to set show_in_menu
to FALSE
and to create the submenu by yourself with https://developer.wordpress.org/reference/functions/add_submenu_page/
Related Posts:
- How to change page via login as user and admin
- Position image widget in mega menu
- Custom access given to Admin dashboard
- how to use wc_create_order with subscription product
- Add custom variable to cart content [closed]
- Reorder custom submenu item
- WooCommerce changes lost password reset link
- Woocommerce My Account Endpoint – how to get ID parameter from URL?
- Default woocommerce placeholder image
- WooCommerce: Add New Report Tab
- How to add Woocomrce cart page shipping calculator to my country state list
- Custom Woocommerce image size [closed]
- Migrate WooCommerce Orders [closed]
- WooCommerce Subscriptions: Show monthly Price for annual Product
- How to add multiple product gallery images from front-end
- Hide income in Woocomercer [closed]
- Hide tabs on woocommerce product editor for user role
- Disabling the free shipping method when the cart has product/s which assigned a certain shipping class [closed]
- woocommerce_email_subject_customer_completed_order
- is_shop, is_home, is_front_page doesn’t work for woocommerce
- WooCommerce: The model of e-mail is displaying only the html, not css [closed]
- How to show loading spinner after click on add to cart button [closed]
- Insert & order custom post types in/as submenu
- Woocommerce – Show random product thumbnail from specific product category
- How to add a greeting message upon logging into WordPress for certain user role
- Modify some CSS with functions if (function_exists
- Limit total quantity of products in WooCommerce group product
- WordPress keeps moving my widgets to other widget areas
- Woo-commerce Checkout Summarized in Pop-up Card Entry Only
- Display Message if woocommerce coupon is not applicable to some items in the cart
- (Woocommerce) How to add a custom page between cart and checkout with a file upload field per product item in the cart?
- How do I add an extra field to comment form above the submit button?
- woocommerce email template detect email recipient
- WooCommerce – buying as well as selling
- How do I hide ‘out of stock’ products in the admin ‘product’ page?
- WordPress and WooCommerce – How many products are too many? [closed]
- Add custom field to Woocommerce add new attribute / edit page
- woocommerce axios react
- How to get woocommerce selected variation from order object
- JWT on Woocommerce cannot work with “Customer” role user
- Woocommerce – Add HTML around Product description [closed]
- relocate woocommerce notices/messages on Cart page
- Woocommerce emails from gmail not being sent
- lost password link not working for my site
- How to give each category name its own ACF background color?
- WooCommerce 4: Gallery size is too large in mobile
- WooCommerce event works in jQuery but not in JavaScript
- Filter default_content only for products
- Get woocommerce coupon code
- Remove Visual Editor and P tags from WooCommerce Taxonomy Descriptions [closed]
- Woocommerce Remove Tax by Product Type
- get_posts $args won’t accept array as one of the criteria?
- Custom fields values not being created
- Adding additional text under the price via product page
- Display WooCommerce product category on shop page (on every product)
- Add custom parameters to Woocommerce add to cart link
- Multisite login – registration is duplicated
- WooCommerce variable product can not add to cart using ajax after updating latest version of WooCommerce
- Create a Search Form that only Searches with WooCommerce Sale Products
- Update WooCommerce Sale Price & Date Based On Attribute Value
- Add quantity of variations together and show it to parent quantity field Woocommerce
- Woocommerce: How to change the attribute values per product
- Delete method giving 500 error, for this endpoint /wc/store/cart/items
- add_post_meta add latest data from meta_value array
- WordPress | Woocommerce | use “category display type” in if statement
- WordPress & Woocommerce variation Price
- Adding country subdomain to an existing website like www.example.com/uk
- Move woocommerce directory
- Hide review form if user has left a comment
- Some html elements displaing in a strange order in WordPress
- Update / refresh mini cart, after custom AJAX add_to_cart event
- How can I get a get a list of customers from a list of email addresses?
- Woocommerce: sorting variable product
- Remove filter parameter from Link URL
- Woocommerce price in meta data
- White screen only on some woocommerce products
- How to create woocommerce products list
- add_action don’t updates theme layout when using values from the WordPress customizer
- How can I change my search form to bring up product results, not blog results
- Prevent user from changing any account data once it is setup
- Redirect After Registration on Specific Link
- Incorrect translation of ‘shipping’ at woocommerce checkout page after WC update 3.4*
- Woocommerce: Unique price for individual basket items
- Site with WooCommerce section moved to HTTPS – all pages except home and main store are 404s
- Multiple quantities with options
- how to add custom reviews button in woocommerce order complete generated mail
- Click Count on Download a File
- Adding more than one item to Woocommerce cart
- Not all strings are translated
- Woocommerce – get product in category with specific attribute
- Woocommerce make appear when items added to cart
- Testimonials/Reviews for Products
- How to display Woocommerce catagories
- add custom menu in woocommerce dashboard [closed]
- Woocommerce hidden fields with meta keys and values. how?
- Updating order meta to have a meta entry from an item in the order
- error 500 in Back Office when using a woocommerce function in functions.php
- Sort by price when price is set in multiple keys
- Add a custom code with custom link after add to cart for every product
- WooCommerce product permalink based on product’s current category