{"id":232765,"date":"2023-01-28T09:59:00","date_gmt":"2023-01-28T06:59:00","guid":{"rendered":"https:\/\/wordpress.mediadoma.com\/?p=232765"},"modified":"2022-11-10T17:40:53","modified_gmt":"2022-11-10T14:40:53","slug":"jak-pokazati-zvichajnu-cinu-za-umovchannjam-dlja-woocommerce-wordpress-na-osnovi-cini-prodazhu","status":"publish","type":"post","link":"https:\/\/wordpress.mediadoma.com\/uk\/jak-pokazati-zvichajnu-cinu-za-umovchannjam-dlja-woocommerce-wordpress-na-osnovi-cini-prodazhu\/","title":{"rendered":"\u042f\u043a \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0438 \u0437\u0432\u0438\u0447\u0430\u0439\u043d\u0443 \u0446\u0456\u043d\u0443 \u0437\u0430 \u0443\u043c\u043e\u0432\u0447\u0430\u043d\u043d\u044f\u043c \u0434\u043b\u044f Woocommerce\/WordPress \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0456 \u0446\u0456\u043d\u0438 \u043f\u0440\u043e\u0434\u0430\u0436\u0443?"},"content":{"rendered":"<p><a href=\"https:\/\/helloacm.com\/how-to-remove-product-review-in-woocommercewordpress\/\" target=\"_blank\" rel=\"noopener nofollow\" class=\"external external_icon\">Woocommerce<\/a> \u2014 \u0446\u0435 \u043f\u043e\u0442\u0443\u0436\u043d\u0438\u0439 \u043f\u043b\u0430\u0433\u0456\u043d\/\u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a, \u044f\u043a\u0438\u0439 \u0434\u0430\u0454 \u0437\u043c\u043e\u0433\u0443 \u0441\u0442\u0432\u043e\u0440\u0438\u0442\u0438 \u0456\u043d\u0442\u0435\u0440\u043d\u0435\u0442-\u043c\u0430\u0433\u0430\u0437\u0438\u043d \u0437\u0430 \u0434\u043e\u043f\u043e\u043c\u043e\u0433\u043e\u044e WordPress. \u0412\u0438 \u043c\u043e\u0436\u0435\u0442\u0435 \u0440\u0435\u0434\u0430\u0433\u0443\u0432\u0430\u0442\u0438 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0438 \u0434\u043b\u044f \u043a\u043e\u0436\u043d\u043e\u0433\u043e \u0442\u043e\u0432\u0430\u0440\u0443, \u0430\u043b\u0435 \u0456\u043d\u043e\u0434\u0456 \u0443 \u0432\u0430\u0441 \u0442\u0430\u043a \u0431\u0430\u0433\u0430\u0442\u043e \u0442\u043e\u0432\u0430\u0440\u0456\u0432, \u0449\u043e \u043c\u043e\u0436\u0435 \u0437\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0438\u0441\u044f \u0447\u0430\u0441, \u0449\u043e\u0431 \u043e\u043d\u043e\u0432\u0438\u0442\u0438 \u043f\u0435\u0432\u043d\u0438\u0439 \u0430\u0442\u0440\u0438\u0431\u0443\u0442 \u0434\u043b\u044f \u0442\u043e\u0432\u0430\u0440\u0443.<\/p>\n<p>\u041d\u0430\u043f\u0440\u0438\u043a\u043b\u0430\u0434, \u044f\u043a\u0449\u043e \u0432\u0438 \u0437\u0430\u0431\u0443\u043b\u0438 \u0432\u043a\u0430\u0437\u0430\u0442\u0438 \u0437\u0432\u0438\u0447\u0430\u0439\u043d\u0443 \u0446\u0456\u043d\u0443 \u0434\u043b\u044f \u0442\u043e\u0432\u0430\u0440\u0456\u0432, \u0432\u043e\u043d\u0430 \u043d\u0435 \u0432\u0456\u0434\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u0438\u043c\u0435\u0442\u044c\u0441\u044f \u043f\u0435\u0440\u0435\u0445\u0440\u0435\u0441\u043d\u0438\u043c\u0438 \u0448\u0440\u0438\u0444\u0442\u0430\u043c\u0438, \u044f\u043a-\u043e\u0442 ~100,00 GBP~. \u0410\u043b\u0435 \u0431\u0443\u043b\u043e \u0431 \u043d\u0435\u043f\u043e\u0433\u0430\u043d\u043e \u0432\u043a\u0430\u0437\u0430\u0442\u0438 \u0437\u0432\u0438\u0447\u0430\u0439\u043d\u0443 \u0446\u0456\u043d\u0443, \u0449\u043e\u0431 \u043a\u043b\u0456\u0454\u043d\u0442\u0438 \u0432\u0456\u0434\u0447\u0443\u043b\u0438, \u0449\u043e \u0442\u043e\u0432\u0430\u0440\u0438 \u043f\u0440\u043e\u0434\u0430\u044e\u0442\u044c\u0441\u044f (\u0434\u0435\u0448\u0435\u0432\u0448\u0435), \u0456 \u0446\u0435, \u0431\u0435\u0437\u043f\u0435\u0440\u0435\u0447\u043d\u043e, \u0437\u0431\u0456\u043b\u044c\u0448\u0438\u0442\u044c \u0440\u0456\u0432\u0435\u043d\u044c \u043f\u043e\u043a\u0443\u043f\u043a\u0438.<\/p>\n<p>\u0412\u0438 \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u0438 \u0441\u043a\u043b\u0430\u0434\u043d\u0438\u0439 SQL \u0434\u043b\u044f \u043e\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044f \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u0438\u0445, \u0430\u043b\u0435 \u0446\u0435 \u0431\u0443\u0434\u0435 \u0440\u0438\u0437\u0438\u043a\u043e\u0432\u0430\u043d\u043e \u0442\u0430 \u043c\u043e\u0436\u0435 \u0431\u0443\u0442\u0438 \u043d\u0435 \u0442\u0430\u043a\u0438\u043c \u0433\u043d\u0443\u0447\u043a\u0438\u043c, \u044f\u043a \u043d\u0430\u0441\u0442\u0443\u043f\u043d\u0438\u0439 \u043c\u0435\u0442\u043e\u0434. \u0420\u043e\u0437\u043c\u0456\u0441\u0442\u0456\u0442\u044c \u043d\u0430\u0432\u0435\u0434\u0435\u043d\u0438\u0439 \u043d\u0438\u0436\u0447\u0435 \u043a\u043e\u0434 PHP \u0443 \u0448\u0430\u0431\u043b\u043e\u043d\u0456 <strong>functions.php \u0434\u043e\u0447\u0456\u0440\u043d\u044c\u043e\u0457 \u0442\u0435\u043c\u0438<\/strong><\/p>\n<pre><code>function helloacm_regular_price( $price, $product) {\n\u00a0 $price_factor = 1.3; \/\/ show sale price * 1.3 \n\u00a0 $sale_price = $product-&gt;get_sale_price(); \/\/ get sale price\n\u00a0 if (!is_numeric($sale_price)) { \/\/ sale price not set\n\u00a0 \u00a0 return $price; \u00a0\/\/ return default price.\n\u00a0 }\n\u00a0 $exp_price = $sale_price * $price_factor; \u00a0\/\/ get expected regular price\n\u00a0 if ($price &gt; 0) { \u00a0\/\/ if regular price is filled\n\u00a0 \u00a0 if ($price &lt; $sale_price) { \/\/ if it is even smaller than sale price\n\u00a0 \u00a0 \u00a0 return $exp_price; \u00a0\/\/ return corrected regular price\n\u00a0 \u00a0 } \u00a0 \u00a0 \n\u00a0 \u00a0 return $price; \/\/ otherwise return the input regular price\n\u00a0 }\n\u00a0 return $exp_price; \/\/ return the default regular price\n}\nadd_filter( 'woocommerce_get_regular_price', 'helloacm_regular_price', 10, 2);<\/code><\/pre>\n<p>\u0426\u0435 \u0432\u0441\u0435. \u042f\u043a\u0449\u043e \u0437\u0432\u0438\u0447\u0430\u0439\u043d\u0443 \u0446\u0456\u043d\u0443 \u043d\u0435 \u0432\u0432\u0435\u0434\u0435\u043d\u043e, \u0432\u0456\u0434\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u0438\u043c\u0435\u0442\u044c\u0441\u044f \u0437\u0432\u0438\u0447\u0430\u0439\u043d\u0430 \u0446\u0456\u043d\u0430 \u0437\u0430 \u0443\u043c\u043e\u0432\u0447\u0430\u043d\u043d\u044f\u043c, \u044f\u043a\u0430 \u0434\u043e\u0440\u0456\u0432\u043d\u044e\u0454 <strong>$price_factor<\/strong>, \u043f\u043e\u043c\u043d\u043e\u0436\u0435\u043d\u043e\u043c\u0443 \u043d\u0430 \u0446\u0456\u043d\u0443 \u043f\u0440\u043e\u0434\u0430\u0436\u0443. \u0412 \u0456\u043d\u0448\u043e\u043c\u0443 \u0432\u0438\u043f\u0430\u0434\u043a\u0443 \u0431\u0443\u0434\u0435 \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u043e \u043f\u0435\u0440\u0435\u0432\u0456\u0440\u043a\u0443 \u0431\u0435\u0437\u043f\u0435\u043a\u0438, \u0449\u043e\u0431 \u043f\u0435\u0440\u0435\u043a\u043e\u043d\u0430\u0442\u0438\u0441\u044f, \u0449\u043e \u0437\u0432\u0438\u0447\u0430\u0439\u043d\u0430 \u0446\u0456\u043d\u0430 \u0437\u0430\u0432\u0436\u0434\u0438 \u0432\u0438\u0449\u0430 \u0437\u0430 \u0446\u0456\u043d\u0443 \u043f\u0440\u043e\u0434\u0430\u0436\u0443.<\/p>\n<p>\u0426\u0435 \u043d\u0435 \u0437\u043c\u0456\u043d\u044e\u0454 \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u0438\u0445, \u0442\u043e\u043c\u0443 \u0446\u0435 \u0432\u0432\u0430\u0436\u0430\u0454\u0442\u044c\u0441\u044f \u043d\u0430\u0439\u0431\u0435\u0437\u043f\u0435\u0447\u043d\u0456\u0448\u0438\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c \u0432\u0438\u043a\u043e\u043d\u0430\u043d\u043d\u044f \u0442\u0440\u044e\u043a\u0456\u0432. \u041f\u0435\u0440\u0435\u0434 \u043f\u043e\u0432\u0435\u0440\u043d\u0435\u043d\u043d\u044f\u043c \u0437\u0432\u0438\u0447\u0430\u0439\u043d\u043e\u0457 \u0446\u0456\u043d\u0438 \u0434\u043e\u0434\u0430\u0454\u0442\u044c\u0441\u044f \u0444\u0456\u043b\u044c\u0442\u0440 <strong>woocommerce_get_regular_price .<\/strong><\/p>\n<p><div id=\"PostUnique_PostSource\" style=\"padding-top: 50px\">\u0414\u0436\u0435\u0440\u0435\u043b\u043e \u0437\u0430\u043f\u0438\u0441\u0443:  <a target=\"_blank\" rel=\"noopener nofollow\" href=\"\/\/helloacm.com\" class=\"external external_icon\">helloacm.com<\/a><\/div><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u042f\u043a \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0438 \u0437\u0432\u0438\u0447\u0430\u0439\u043d\u0443 \u0446\u0456\u043d\u0443 \u0437\u0430 \u0443\u043c\u043e\u0432\u0447\u0430\u043d\u043d\u044f\u043c \u0434\u043b\u044f Woocommerce\/WordPress \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0456 \u0446\u0456\u043d\u0438 \u043f\u0440\u043e\u0434\u0430\u0436\u0443?<\/p>\n","protected":false},"author":1,"featured_media":223696,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":"","_wp_rev_ctl_limit":""},"categories":[808,859,869,839,902,849,819],"tags":[1174],"class_list":["post-232765","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-php-10","category-woocommerce-10","category-wordpress-10","category-kerivnytstvo-dlia-pochatkivtsiv","category-kod-3","category-pidruchnyky","category-plahiny","tag-affiai-uk"],"_links":{"self":[{"href":"https:\/\/wordpress.mediadoma.com\/uk\/wp-json\/wp\/v2\/posts\/232765","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.mediadoma.com\/uk\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wordpress.mediadoma.com\/uk\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.mediadoma.com\/uk\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.mediadoma.com\/uk\/wp-json\/wp\/v2\/comments?post=232765"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.mediadoma.com\/uk\/wp-json\/wp\/v2\/posts\/232765\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wordpress.mediadoma.com\/uk\/wp-json\/wp\/v2\/media\/223696"}],"wp:attachment":[{"href":"https:\/\/wordpress.mediadoma.com\/uk\/wp-json\/wp\/v2\/media?parent=232765"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wordpress.mediadoma.com\/uk\/wp-json\/wp\/v2\/categories?post=232765"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wordpress.mediadoma.com\/uk\/wp-json\/wp\/v2\/tags?post=232765"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}