{"id":16235,"date":"2023-09-28T18:33:26","date_gmt":"2023-09-28T16:33:26","guid":{"rendered":"https:\/\/www.welaunch.io\/en\/?post_type=faq&#038;p=16235"},"modified":"2023-09-28T18:33:26","modified_gmt":"2023-09-28T16:33:26","slug":"how-to-show-uvp-rrp-price-in-woocommerce-invoice","status":"publish","type":"faq","link":"https:\/\/www.welaunch.io\/en\/knowledge-base\/faq\/how-to-show-uvp-rrp-price-in-woocommerce-invoice\/","title":{"rendered":"How to show UVP \/ RRP price in WooCommerce Invoice"},"content":{"rendered":"<p>To show the regular or sale price in a WooCommerce PDF invoice is easy. But what if you want to show a custom meta field like the RRP \/ UVP price below the regular price?<\/p>\n<p>If you want to achieve this using our WooCommerce invoice PDF plugin, you can add the following snippet to your child theme.<\/p>\n<p>The meta key used is &#8220;bm_rrp&#8221; (RRP Price). Of course you can change this to whatever you want.<\/p>\n<pre>\r\n\r\nadd_filter( 'woocommerce_pdf_invoices_product_price_html', function($price_html, $item, $product) {\r\n\r\n    $uvp = $product->get_meta('bm_rrp');\r\n    if(!empty($uvp)) {\r\n        $price_html .= '<br>UVP: ' . wc_price($uvp);\r\n    }\r\n\r\n    return $price_html;\r\n\r\n}, 20, 3);\r\n<\/pre>\n","protected":false},"author":1,"featured_media":0,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","product_cat":[],"class_list":["post-16235","faq","type-faq","status-publish","hentry","faq_topics-pdf-invoices","faq_topics-pdf-invoices-filter-hooks"],"_links":{"self":[{"href":"https:\/\/www.welaunch.io\/en\/wp-json\/wp\/v2\/faq\/16235","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.welaunch.io\/en\/wp-json\/wp\/v2\/faq"}],"about":[{"href":"https:\/\/www.welaunch.io\/en\/wp-json\/wp\/v2\/types\/faq"}],"author":[{"embeddable":true,"href":"https:\/\/www.welaunch.io\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.welaunch.io\/en\/wp-json\/wp\/v2\/comments?post=16235"}],"version-history":[{"count":1,"href":"https:\/\/www.welaunch.io\/en\/wp-json\/wp\/v2\/faq\/16235\/revisions"}],"predecessor-version":[{"id":16236,"href":"https:\/\/www.welaunch.io\/en\/wp-json\/wp\/v2\/faq\/16235\/revisions\/16236"}],"wp:attachment":[{"href":"https:\/\/www.welaunch.io\/en\/wp-json\/wp\/v2\/media?parent=16235"}],"wp:term":[{"taxonomy":"product_cat","embeddable":true,"href":"https:\/\/www.welaunch.io\/en\/wp-json\/wp\/v2\/product_cat?post=16235"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}