{"id":15958621,"date":"2022-08-29T08:01:49","date_gmt":"2022-08-29T08:01:49","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/custom-composite-variations-price-via-hooks-functions-php\/"},"modified":"2022-08-29T08:52:45","modified_gmt":"2022-08-29T08:52:45","slug":"custom-composite-variations-price-via-hooks-functions-php","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/custom-composite-variations-price-via-hooks-functions-php\/","title":{"rendered":"Custom composite variations price via hooks \/ functions.php"},"content":{"rendered":"<p>Hello,<\/p>\n<p>is there any possibility to set custom display of prices on composite product page and also in selectbox via hooks?<\/p>\n<p>I have set in functions.php to display custom prices (with discounts etc.), but they don&#8217;t show for composite products (only the regular price is displayed there). For other types of products they work fine.<\/p>\n<p>The hooks for my customized prices I have set up now are as follows:<\/p>\n<pre><code>woocommerce_product_get_price\nwoocommerce_product_get_regular_price\nwoocommerce_product_variation_get_regular_price\nwoocommerce_product_variation_get_price\nwoocommerce_product_variation_get_price\nwoocommerce_product_variation_get_regular_price\nwoocommerce_price_variation_price\nwoocommerce_variation_prices_regular_price<\/code><\/pre>\n<p>My composite product consists of 3 variants. If I open these variants on a separate page of the parent product, the prices are correct. However, if these variants are opened within the composite product, only regular prices are displayed.<\/p>\n<p>What hook or other option could I use if I wanted to adjust prices for a composite product as well?<\/p>\n<p>Thanks!<\/p>\n","protected":false},"template":"","class_list":["post-15958621","topic","type-topic","status-publish","hentry","topic-tag-price","topic-tag-variable","topic-tag-variations"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/15958621","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":2,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/15958621\/revisions"}],"predecessor-version":[{"id":15958772,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/15958621\/revisions\/15958772"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=15958621"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}