-1

I'm not a coder so please be gentle with your advice. I created a website in Wordpress and I purchased a plugin called Dokan which allowed me to create a marketplace. There is a specific select list with various options shown to my website's vendors in their vendor portals. I can also see this same select list with the same options from my WordPress panel which is not accessible by my site's vendors.

I would like to hide a specific option from select list so that vendors cannot see it anymore, only myself. I would like to hide it through css.

I want to hide 'wc-failed'

  • Does this answer your question? [How to hide a – Yash Chitroda Sep 11 '21 at 02:40

1 Answers1

0

When you are logged in as the Wordpress administrator you should be able to see in the lefthand panel Appearance. Go to Customize then to Additional CSS.

You can type in extra CSS styling rules here.

To not show the particular option you can select it and set it through:

#order_status option[value="wc-failed"] { display: none; }

Note, this should result in that option not being seen, and no space reserved for it in the list (unlike visibility: hidden). However, the code is still there should the user have a look through their browser and they could reinstate it. I doubt this matters in this circumstance, but it's as well to be aware that if there is say a security issue if they go to that option they can still get there.

A Haworth
  • 30,908
  • 4
  • 11
  • 14
  • Hi, this worked in Google Chrome but not in Safari. Is there anyway I can make it work in Safari? – Irving Beltran Sep 12 '21 at 15:52
  • That's very weird. Is Safari picking up a cached version of the site? Can you look in the inspect facility to see what/where the styling for that element is being set? Is there a site I can look at? – A Haworth Sep 12 '21 at 17:26
  • I think it'd be best if I gave you access to the site page I'm referring to. – Irving Beltran Sep 13 '21 at 01:19
  • 1. Access https://modabea.com/; 2. Then go to the top-right corner and login using the following credentials (Username: peppa8590@gmail.com; Password: modabeabb2021); 3. Go to https://modabea.com/panel-de-control-para-empresas/orders/; 4. Select a random order; 5. Under the right section called "Datos generales" you'll see a select tab after clicking "Editar" next to a red status update alert ; I hid "wc-archived" and "wc-refunded" in Google Chrome but they still appear in Safari. I hope you can please help me. Many thanks! – Irving Beltran Sep 13 '21 at 01:22
  • Hi, any update? I've still been trying to fix the Safari issue but it hasn't worked! – Irving Beltran Sep 18 '21 at 03:28
  • I hadn't realised that styling options is just not fully possible in some browsers. See for example https://stackoverflow.com/questions/4398966/how-can-i-hide-select-options-with-javascript-cross-browser so my answer is invalid but I'll leave it here in case this link is useful. – A Haworth Sep 18 '21 at 04:01