I don’t know if there is a shortcode that will get you all the PPOM data stored with a particular product in one convenient call. I haven’t checked the source code but I doubt it exists.
You can, however, get the data from the WooCommerce cart array by looping through the WC cart array like so:
foreach (WC()->cart->get_cart() as $cart_item_key => $cart_item) {
$ppom_data = $cart_item["ppom"]["fields"];
var_dump($ppom_data);
}
The code above will give you a visual reference to the data stored when a customer uses the PPOM plugin fields on a product. So if you have a PPOM option called “size” then you should be able to reference it by using $cart_item["ppom"]["fields"]["size"]. If the data you want to reference has a space in the PPOM field name, then replace the spaces with underscores. Use the data name that PPOM generates when you save a field.
This is just an example of how to reference and find how the data is stored in the cart. This code shouldn’t be used anywhere on a production website open to the public.
Hi @pattice!
Unfortunately, there is no way to achieve this using the plugin options. However, it may be possible to do it using custom code.
Thanks for understanding and have a nice day!