Search code examples
phpcsswordpresscustom-wordpress-pages

How to hide columns from dokan vendor dashboard?


My website is built on WordPress and WooCommerce. I am using Dokan multivendor pro plugin and WC Bookings plugin. When a vendor logins then he/she is redirected to the Dokan vendor dashboard .

In the dashboard under Booking ------ Manage Bookings , all the bookings shows . In that table i want to remove two columns as shown in the image below .

changes required is shown in the image


Solution

  • In order to remove them physically from page you'd have to locate the query and/or the table loop process in the plugin's php files itself and modify them for your need, but if you just want the existing info on the page not to show you can right click on your browser to see the id, or class of the table then add a custom CSS modifying the behavior of these objects.

    So let's assume these are called 'BookingTable'. Then the code you're looking for should look like this:

    #BookingTable tr td:nth-child(5), #BookingTable tr td:nth-child(6) {
        display: none;
    }
    

    The key here is the "nth-child" selector, which lets you access to the children of a repetitive tag by referring to their order index number in a group.

    You can use these selectors to access these repetitive DOM objects and manipulate their appearances, not the actual data sent to the client browser. Like I said, in order to prevent the client to receive this data all together you have to remove the information through the PHP code (which I don't have access to so I can't help you with that)

    I hope this helps. Cheers!