• Resolved Yoann

    (@yoanngadon)


    Hi,

    I’m trying to remove and edit some products fields from woocommerce admin. 
    – I would like to hide the “description” field. My theme use the “short description”. I can hide the short description in admin but not the description.
    – I need to make some field mandatory to save the product (title, short description, pictures and price)
    – And for the prices I would like to edit this field to be a dropdown list instead of a text field.

    Is there any way I could edit those field without touching woocommerce code and lose everything after an update ?

    Best regards

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi @yoanngadon,

    Thank you for reaching out to us with your query. Let’s address your concerns one by one.

    1. Hiding the “Description” Field:
      To hide the “Description” field in the WooCommerce admin, you can add custom CSS to your theme. This can be done by going to the ‘Appearance’ > ‘Customize’ section of your WordPress dashboard and adding the following CSS:
       .product_description { display: none; }

    This will hide the description field from your product pages. If the code does not work, please share the link to the prodcut page.

    1. Making Fields Mandatory:
      To make certain fields mandatory, you’ll need to use custom code snippets that hook into WooCommerce’s functions. For example, to make the title field mandatory, you can use the woocommerce_product_options_general_product_data hook.
    2. Changing the Price Field to a Dropdown List:
      Changing the price field to a dropdown list is a bit more complex and might require a custom plugin. However, you can check our available plugins that might offer similar functionality at https://woo.com/products/. If you don’t find what you’re looking for, you might consider hiring a developer to create a custom solution for you.

    Please note that writing or providing custom code is not within the scope of our support policy. For development and custom coding questions, it’s best to ask for insight related to those on either the WooCommerce Advanced Facebook group or the WooCommerce Community Slack. You can also seek help from the following:

    I wish I could help more, but hopefully, this gets you going in the right direction to get the job done.

    anastas10s

    (@anastas10s)

    We haven’t heard back from you in a while, so I’m going to mark this as resolved – we’ll be here if and/or when you are ready to continue.

    Thread Starter Yoann

    (@yoanngadon)

    Hi,

    thank you for your reply and sorry for the late answer, I tried : .product_description { display: none; } in the custom CSS :

    but doesn’t work,

    Best regards

    Plugin Support omarfpg a11n

    (@omarfpg)

    Hi @yoanngadon,

    Apologies, that instruction wasn’t correct. The CSS added there is only meant to work on the front end. Applying CSS to the back end is a bit more technical.

    Additionally, some of your questions also imply JS (making fields mandatory) or HTML (changing price to be a dropdown). All of this counts as customization which is outside of our support scope.

    Maybe a quick Google Search would be a good place to start for this one! You could also hire a developer to help you with this. We’ve partenered with Codeable who you can ask for custom projects.

    I hope this helps!

    Cheers!
    -OP

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Edit fields in WooCommerce admin’ is closed to new replies.