Woocommerce: Table specific product sales with metadata in front end

Ok so here is my aim:

I have a single product with no category. I have used the ‘YITH Woocommerce Product Add-ons’ to add a group of checkboxes to the product that accepts 4 selections. The order is raised and the product has the 4 selections of checkboxes listed in the cart/checkout pages and also on the order page in my account. So far so good! Now…

I wish to produce a table on the frontend that lists all the sales of the product with the order date, first and last name of the customer and the 4 selections the customer made when ordering the product. For example…

Product X Sales:

First Name | Last Name | Date | Select 1 | Select 2 | Select 3 | Select 4

I have looked at the plugin ‘Product Customer List for WooCommerce’, this has a shortcode for displaying a list of customers and date when the product was purchased however; I don’t have a way of extracting the metadata stored by the YITH Product Add-on field attached to the product sale.

Any help would be appreciated either with or without the Product Customer List plugin. Looking for some code possibly to recall the data per product sale and list it correctly in a frontend table.

Thanks in advance!

Read more here: Woocommerce: Table specific product sales with metadata in front end

Leave a Reply

Your email address will not be published. Required fields are marked *