Skip to content
Advertisement

Search value of custom coulmn in Woocommerce Admin Orders list

I got a help from people here to create a coulmn in the woocommerce>orders table to preview the description of the first product in the order only. by the code below:

Now how can i make it searchable when i search by the value of the column to show the orders that contain that product description only

All i need is to make this column values to be searchable as they don’t now.

JavaScript

I want now to be able to search by “success event” for example that is in “event” column that is generated by the product description of the first item in the order is it possible ?

Screenshot: enter image description here

Advertisement

Answer

Please check the below code.

Note: When the Plugin update this code will automatically remove.

Solution:- File Path:/plugins/woocommerce/includes/data-stores/class-wc-order-data-store-cpt.php

Function name :- search_orders()

After this code

JavaScript

Add this code

JavaScript

Note: When Plugin update this code will remove.

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement