{"id":13917970,"date":"2021-01-17T09:34:33","date_gmt":"2021-01-17T09:34:33","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/thank-you-page-variation\/"},"modified":"2021-01-17T09:34:33","modified_gmt":"2021-01-17T09:34:33","slug":"thank-you-page-variation","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/thank-you-page-variation\/","title":{"rendered":"thank you page variation"},"content":{"rendered":"<p>Hello, I&#8217;m trying to add the chosen variations as in the cart, but on the thank you page. I managed to activate the images via a small code, but I don&#8217;t know how to show the selected variations on the last page. Do you have an idea? Thanks to you<\/p>\n<p>Here is my code<\/p>\n<pre><code>Hello, I&#039;m trying to add the chosen variations as in the cart, but on the thank you page. I managed to activate the images via a small code, but I don&#039;t know how to show the selected variations on the last page. Do you have an idea? Thanks to you\n\nHere is my code\n\nadd_filter( &#039;woocommerce_order_item_name&#039;, &#039;ts_product_image_on_order_pay&#039;, &#039;cart_variation_description&#039;, 10, 3 );\n \nfunction ts_product_image_on_order_pay( $name, $item, $extra ) {\n \n\/* Return if not checkout page *\/\n \nif (! is_checkout() ) {\n \nreturn $name;\n \n}\n \n$product_id = $item-&gt;get_product_id();\n \n\/* Get product object *\/\n \n$_product = wc_get_product( $product_id );\n \n\/* Get product thumbnail *\/\n \n$thumbnail = $_product-&gt;get_image();\n \n\/* Add wrapper to image and add some css *\/\n \nimage = &#039;&lt;div class=&quot;ts-product-image&quot; style=&quot;width: 52px; height: 45px; display: inline-block; padding-right: 7px; vertical-align: middle;&quot;&gt;&#039;&#039;.\n \n. $thumbnail .\n \n&lt;\/div&gt;&#039;;\n \n\/* Prepend image to name and return it *\/\n \nreturn $image . $name ;\n \n}\n<\/code><\/pre>\n","protected":false},"template":"","class_list":["post-13917970","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/13917970","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/13917970\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=13917970"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}