{"id":233345,"date":"2023-02-12T14:32:00","date_gmt":"2023-02-12T11:32:00","guid":{"rendered":"https:\/\/wordpress.mediadoma.com\/?p=233345"},"modified":"2022-11-10T20:35:51","modified_gmt":"2022-11-10T17:35:51","slug":"jak-zminiti-tipovi-teksti-woocommerce-za-dopomogoju-kodu","status":"publish","type":"post","link":"https:\/\/wordpress.mediadoma.com\/uk\/jak-zminiti-tipovi-teksti-woocommerce-za-dopomogoju-kodu\/","title":{"rendered":"\u042f\u043a \u0437\u043c\u0456\u043d\u0438\u0442\u0438 \u0442\u0438\u043f\u043e\u0432\u0456 \u0442\u0435\u043a\u0441\u0442\u0438 WooCommerce \u0437\u0430 \u0434\u043e\u043f\u043e\u043c\u043e\u0433\u043e\u044e \u043a\u043e\u0434\u0443"},"content":{"rendered":"\n<p>WooCommerce \u043f\u0435\u0440\u0435\u043f\u043e\u0432\u043d\u0435\u043d\u0438\u0439 \u0444\u0456\u043b\u044c\u0442\u0440\u0430\u043c\u0438, \u0445\u0443\u043a\u0430\u043c\u0438 \u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0456\u044f\u043c\u0438, \u044f\u043a\u0456 \u0434\u043e\u043f\u043e\u043c\u043e\u0436\u0443\u0442\u044c \u0432\u0430\u043c \u043d\u0430\u043b\u0430\u0448\u0442\u0443\u0432\u0430\u0442\u0438 \u0442\u0430 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0432\u0430\u0442\u0438 \u043f\u043b\u0430\u0433\u0456\u043d \u0443 \u0432\u0430\u0448\u0456\u0439 \u0442\u0435\u043c\u0456 \u0447\u0438 \u043f\u043b\u0430\u0433\u0456\u043d\u0456. \u041e\u0441\u044c \u0434\u0435\u044f\u043a\u0456 \u043d\u0435\u0432\u0435\u043b\u0438\u043a\u0456, \u0430\u043b\u0435 \u043a\u043e\u0440\u0438\u0441\u043d\u0456 \u043f\u0440\u0438\u043a\u043b\u0430\u0434\u0438 \u043a\u043e\u0434\u0443, \u0430-\u0445\u0430 \u0456 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u043d\u0456 \u0432\u043a\u0430\u0437\u0456\u0432\u043a\u0438 \u0449\u043e\u0434\u043e \u0437\u0430\u0433\u0430\u043b\u044c\u043d\u0438\u0445 \u0437\u043c\u0456\u043d \u0440\u0456\u0437\u043d\u0438\u0445 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u0438\u0445 \u0432\u0438\u0432\u043e\u0434\u0456\u0432.<\/p>\n<h2>\u0417\u043c\u0456\u043d\u0430 \u0442\u0435\u043a\u0441\u0442\u0443 \u043a\u043d\u043e\u043f\u043a\u0438 \u00ab\u0414\u043e\u0434\u0430\u0442\u0438 \u0432 \u043a\u043e\u0448\u0438\u043a\u00bb.<\/h2>\n<p>\u0404 \u0434\u0432\u0430 \u0444\u0456\u043b\u044c\u0442\u0440\u0438; \u043e\u0434\u0438\u043d \u0434\u043b\u044f \u0442\u0435\u043a\u0441\u0442\u0443 \u00ab\u0434\u043e\u0434\u0430\u0442\u0438 \u0432 \u043a\u043e\u0448\u0438\u043a\u00bb \u0443 \u0446\u0438\u043a\u043b\u0456 (<code>woocommerce_product_add_to_cart_text<\/code>), \u0430 \u0456\u043d\u0448\u0438\u0439 \u0434\u043b\u044f \u043a\u043d\u043e\u043f\u043a\u0438 \u0432 \u043e\u043a\u0440\u0435\u043c\u043e\u043c\u0443 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0456 (<code>woocommerce_product_single_add_to_cart_text<\/code>):<\/p>\n<pre><code>\/\/ Single product view\nadd_filter('woocommerce_product_single_add_to_cart_text', function($text) {\n    return __('Buy this now', 'txtdomain');\n});\n\u00a0\n\/\/ Loop\nadd_filter('woocommerce_product_add_to_cart_text', function($text) {\n    return __('Buy this', 'txtdomain');\n});<\/code><\/pre>\n<p>\u041e\u0434\u043d\u0430\u043a \u043c\u0430\u0439\u0442\u0435 \u043d\u0430 \u0443\u0432\u0430\u0437\u0456, \u0449\u043e \u0446\u0435 \u043f\u0435\u0440\u0435\u043a\u0440\u0438\u0432\u0430\u0454 \u0432\u0441\u0456 \u0442\u0435\u043a\u0441\u0442\u0438 \u00ab\u0414\u043e\u0434\u0430\u0442\u0438 \u0434\u043e \u043a\u043e\u0448\u0438\u043a\u0430\u00bb. \u041d\u0430\u0432\u0456\u0442\u044c \u0442\u0456, \u044f\u043a\u0456 \u0441\u043f\u043e\u0447\u0430\u0442\u043a\u0443 \u0431\u0443\u043b\u0438 \u00ab\u0412\u0438\u0431\u0456\u0440 \u0432\u0430\u0440\u0456\u0430\u043d\u0442\u0456\u0432\u00bb (\u0432\u0430\u0440\u0456\u0430\u043d\u0442\u043d\u0456 \u0442\u043e\u0432\u0430\u0440\u0438) \u0430\u0431\u043e \u00ab\u0414\u043e\u043a\u043b\u0430\u0434\u043d\u0456\u0448\u0435\u00bb (\u043d\u0435\u043c\u043e\u0436\u043b\u0438\u0432\u0456 \u043f\u0440\u0438\u0434\u0431\u0430\u043d\u043d\u044f \u0442\u043e\u0432\u0430\u0440\u0456\u0432 \u2013 \u043d\u0435\u043c\u0430\u0454 \u0446\u0456\u043d\u0438 \u0430\u0431\u043e \u0457\u0445 \u043d\u0435\u043c\u0430\u0454 \u0432 \u043d\u0430\u044f\u0432\u043d\u043e\u0441\u0442\u0456). \u042f\u043a\u0449\u043e \u0432\u0438 \u0431\u0430\u0436\u0430\u0454\u0442\u0435 \u0431\u0456\u043b\u044c\u0448 \u0442\u043e\u0447\u043d\u043e\u0433\u043e \u043d\u0430\u043b\u0430\u0448\u0442\u0443\u0432\u0430\u043d\u043d\u044f, \u0434\u043e\u0434\u0430\u0439\u0442\u0435 \u0434\u0440\u0443\u0433\u0438\u0439 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 \u0434\u043e \u0446\u0438\u0445 \u0444\u0456\u043b\u044c\u0442\u0440\u0456\u0432; \u043e\u0431&#8217;\u0454\u043a\u0442 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0443. \u0412\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0439\u0442\u0435 \u043e\u0431&#8217;\u0454\u043a\u0442 product \u0434\u043b\u044f \u0443\u043c\u043e\u0432\u043d\u043e\u0433\u043e \u043a\u0435\u0440\u0443\u0432\u0430\u043d\u043d\u044f \u0432\u0438\u0445\u043e\u0434\u043e\u043c. \u041d\u0430\u043f\u0440\u0438\u043a\u043b\u0430\u0434, \u0437\u0430 \u0442\u0438\u043f\u043e\u043c \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0443 \u0430\u0431\u043e \u0437\u0430 \u0442\u0438\u043c, \u0447\u0438 \u043c\u043e\u0436\u043d\u0430 \u043f\u0440\u0438\u0434\u0431\u0430\u0442\u0438 \u043f\u0440\u043e\u0434\u0443\u043a\u0442:<\/p>\n<pre><code>add_filter('woocommerce_product_add_to_cart_text', function($text, $product) {\n    if ($product-&gt;is_type('variable')) {\n        return __('Take your pick', 'txtdomain');\n    }\n    if (!$product-&gt;is_purchasable()) {\n        return __('Read more', 'txtdomain');\n    }\n    return $text;\n}, 10, 2);<\/code><\/pre>\n<h2>\u0417\u043c\u0456\u043d\u0456\u0442\u044c \u0432\u0438\u0445\u0456\u0434 \u0446\u0456\u043d\u043e\u0432\u043e\u0433\u043e \u0434\u0456\u0430\u043f\u0430\u0437\u043e\u043d\u0443 \u043d\u0430 \u0437\u043c\u0456\u043d\u043d\u0456 \u0442\u0430 \u0437\u0433\u0440\u0443\u043f\u043e\u0432\u0430\u043d\u0456 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0438<\/h2>\n<p>\u0417\u0430 \u0437\u0430\u043c\u043e\u0432\u0447\u0443\u0432\u0430\u043d\u043d\u044f\u043c WooCommerce \u0432\u0456\u0434\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u0438\u043c\u0435 \u043d\u0430\u0439\u043d\u0438\u0436\u0447\u0443 \u0442\u0430 \u043d\u0430\u0439\u0432\u0438\u0449\u0443 \u0446\u0456\u043d\u0443 \u043d\u0430 \u0440\u0456\u0437\u043d\u043e\u043c\u0430\u043d\u0456\u0442\u043d\u0456 \u0442\u0430 \u0437\u0433\u0440\u0443\u043f\u043e\u0432\u0430\u043d\u0456 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0438 \u0437 \u00ab-\u00bb \u043c\u0456\u0436 \u043d\u0438\u043c\u0438. \u0412\u0438 \u043c\u043e\u0436\u0435\u0442\u0435 \u0434\u0443\u0436\u0435 \u043b\u0435\u0433\u043a\u043e \u0437\u043c\u0456\u043d\u0438\u0442\u0438 \u0446\u0435\u0439 \u0432\u0438\u0445\u0456\u0434 \u0434\u0456\u0430\u043f\u0430\u0437\u043e\u043d\u0443. \u041d\u0430\u043f\u0440\u0438\u043a\u043b\u0430\u0434, \u043f\u0435\u0440\u0435\u043a\u043e\u043d\u0430\u0439\u0442\u0435\u0441\u044f, \u0449\u043e \u0432\u0456\u0434\u043e\u0431\u0440\u0430\u0436\u0430\u0454\u0442\u044c\u0441\u044f \u043b\u0438\u0448\u0435 \u043d\u0430\u0439\u043d\u0438\u0436\u0447\u0430 \u0446\u0456\u043d\u0430 \u0443 \u0444\u043e\u0440\u043c\u0456 \u00ab\u0412\u0456\u0434:\u00bb. WooCommerce \u043c\u0430\u0454 \u043e\u0434\u0438\u043d \u0444\u0456\u043b\u044c\u0442\u0440 \u0434\u043b\u044f \u0437\u043c\u0456\u043d\u043d\u0438\u0445 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0456\u0432 \u0456 \u0456\u043d\u0448\u0438\u0439 \u0434\u043b\u044f \u0437\u0433\u0440\u0443\u043f\u043e\u0432\u0430\u043d\u0438\u0445 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0456\u0432, \u0442\u043e\u043c\u0443 \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e \u0447\u0435\u0440\u0437\u0456 \u0440\u043e\u0437\u0433\u043b\u044f\u043d\u0435\u043c\u043e \u0457\u0445 \u043e\u0431\u0438\u0434\u0432\u0430.<\/p>\n<p>\u041a\u043e\u043d\u0442\u0440\u043e\u043b\u044c \u0432\u0438\u0432\u043e\u0434\u0443 HTML \u0434\u0456\u0430\u043f\u0430\u0437\u043e\u043d\u0443 \u0446\u0456\u043d \u0434\u043b\u044f \u0437\u043c\u0456\u043d\u043d\u0438\u0445 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0456\u0432 \u0437\u0434\u0456\u0439\u0441\u043d\u044e\u0454\u0442\u044c\u0441\u044f \u0437\u0430 \u0434\u043e\u043f\u043e\u043c\u043e\u0433\u043e\u044e \u0444\u0456\u043b\u044c\u0442\u0440\u0430 <code>woocommerce_variable_price_html<\/code>. \u041e\u0431\u2019\u0454\u043a\u0442 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0443 \u043d\u0430\u0434\u0430\u0454\u0442\u044c\u0441\u044f \u044f\u043a \u0434\u0440\u0443\u0433\u0438\u0439 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442.<\/p>\n<p>\u0423\u0441\u0435\u0440\u0435\u0434\u0438\u043d\u0456 \u0444\u0443\u043d\u043a\u0446\u0456\u0457 \u043d\u0430\u043c \u043f\u043e\u0442\u0440\u0456\u0431\u043d\u043e \u043e\u0442\u0440\u0438\u043c\u0430\u0442\u0438 \u0432\u0441\u0456 \u0446\u0456\u043d\u0438. WooCommerce \u043f\u0440\u043e\u043f\u043e\u043d\u0443\u0454 \u0437\u0440\u0443\u0447\u043d\u0443 \u0444\u0443\u043d\u043a\u0446\u0456\u044e \u0434\u043b\u044f \u0437\u043c\u0456\u043d\u043d\u0438\u0445 \u043e\u0431\u2019\u0454\u043a\u0442\u0456\u0432 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0443, <code>get_variation_prices()<\/code>. \u0426\u0435 \u043f\u043e\u0432\u0435\u0440\u0442\u0430\u0454 \u043c\u0430\u0441\u0438\u0432 \u0443\u0441\u0456\u0445 \u0432\u0430\u0440\u0456\u0430\u043d\u0442\u0456\u0432 \u0446\u0456\u043d, \u0432\u0456\u0434\u0441\u043e\u0440\u0442\u043e\u0432\u0430\u043d\u0438\u0445 \u0441\u043f\u043e\u0447\u0430\u0442\u043a\u0443 \u0437\u0430 \u043d\u0430\u0439\u043d\u0438\u0436\u0447\u0438\u043c\u0438. \u0423\u0441\u0435, \u0449\u043e \u043d\u0430\u043c \u043f\u043e\u0442\u0440\u0456\u0431\u043d\u043e \u0437\u0440\u043e\u0431\u0438\u0442\u0438, \u0446\u0435 \u0432\u0438\u0442\u044f\u0433\u043d\u0443\u0442\u0438 \u043f\u0435\u0440\u0448\u0438\u0439 \u0435\u043b\u0435\u043c\u0435\u043d\u0442 \u0443 \u043c\u0430\u0441\u0438\u0432\u0456 \u0446\u0456\u043d \u0456 \u043a\u0440\u0430\u0441\u0438\u0432\u043e \u0439\u043e\u0433\u043e \u0432\u0438\u0432\u0435\u0441\u0442\u0438:<\/p>\n<pre><code>add_filter('woocommerce_variable_price_html', function($html, $product) {\n    $prices = $product-&gt;get_variation_prices(true);\n    $from_price = wc_price(current($prices['price']));\n    return sprintf(__('From: %s', 'txtdomain'), $from_price. $product-&gt;get_price_suffix());\n}, 10, 2);<\/code><\/pre>\n<p>HTML-\u0444\u0456\u043b\u044c\u0442\u0440 \u0432\u0438\u0432\u043e\u0434\u0443 \u0446\u0456\u043d\u043e\u0432\u043e\u0433\u043e \u0434\u0456\u0430\u043f\u0430\u0437\u043e\u043d\u0443 \u0434\u043b\u044f \u0437\u0433\u0440\u0443\u043f\u043e\u0432\u0430\u043d\u0438\u0445 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0456\u0432 \u0434\u0443\u0436\u0435 \u0441\u0445\u043e\u0436\u0438\u0439 \u043d\u0430 \u0437\u043c\u0456\u043d\u043d\u0456 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0438, \u0430\u043b\u0435 \u0437 \u043e\u0434\u043d\u0456\u0454\u044e \u0432\u0456\u0434\u043c\u0456\u043d\u043d\u0456\u0441\u0442\u044e; \u043c\u0430\u0441\u0438\u0432 \u0443\u0441\u0456\u0445 \u0437\u0433\u0440\u0443\u043f\u043e\u0432\u0430\u043d\u0438\u0445 \u00ab\u0434\u0456\u0442\u0435\u0439\u00bb \u0446\u0456\u043d \u0442\u043e\u0432\u0430\u0440\u0456\u0432 \u0432\u043a\u043b\u044e\u0447\u0430\u0454\u0442\u044c\u0441\u044f \u044f\u043a \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 \u0434\u043e \u0444\u0456\u043b\u044c\u0442\u0440\u0443. \u0424\u0456\u043b\u044c\u0442\u0440 \u0434\u043b\u044f \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u0430\u043d\u043d\u044f <code>woocommerce_grouped_price_html<\/code>:<\/p>\n<pre><code>add_filter('woocommerce_grouped_price_html', function($html, $product, $child_prices) {\n    $from_price = wc_price(current($child_prices));\n    return sprintf(__('From: %s', 'txtdomain'), $from_price. $product-&gt;get_price_suffix());\n}, 10, 3);<\/code><\/pre>\n<h2>\u0417\u043c\u0456\u043d\u0438\u0442\u0438 \u0432\u0438\u0445\u0456\u0434\u043d\u0438\u0439 \u0442\u0435\u043a\u0441\u0442 \u0441\u0442\u0430\u043d\u0443 \u0437\u0430\u043f\u0430\u0441\u0456\u0432<\/h2>\n<p>\u042f\u043a\u0449\u043e \u0432\u0438 \u0430\u043a\u0442\u0438\u0432\u0443\u0432\u0430\u043b\u0438 \u0432\u0456\u0434\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f \u0441\u0442\u0430\u0442\u0443\u0441\u0443 \u0437\u0430\u043f\u0430\u0441\u0443 \u0432 \u043d\u0430\u043b\u0430\u0448\u0442\u0443\u0432\u0430\u043d\u043d\u044f\u0445 WooCommerce, \u0432\u0456\u043d \u043c\u0430\u0454 \u0432\u0456\u0434\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u0438 \u0442\u043e\u0447\u043d\u0443 \u043a\u0456\u043b\u044c\u043a\u0456\u0441\u0442\u044c \u0437\u0430\u043f\u0430\u0441\u0456\u0432, \u0449\u043e \u0437\u0430\u043b\u0438\u0448\u0438\u043b\u0438\u0441\u044f, \u0443 \u043f\u0435\u0440\u0435\u0433\u043b\u044f\u0434\u0456 \u043e\u0434\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0443 (\u043d\u0430\u043f\u0440\u0438\u043a\u043b\u0430\u0434, \u00ab42 \u0432 \u043d\u0430\u044f\u0432\u043d\u043e\u0441\u0442\u0456\u00bb). \u041e\u0434\u043d\u0430\u043a \u0432\u0438 \u043c\u043e\u0436\u0435\u0442\u0435 \u0437\u043c\u0456\u043d\u0438\u0442\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442, \u0449\u043e\u0431 \u043d\u0430\u0442\u043e\u043c\u0456\u0441\u0442\u044c \u043f\u043e\u043a\u0430\u0437\u0443\u0432\u0430\u0442\u0438 \u0434\u0456\u0430\u043f\u0430\u0437\u043e\u043d, \u0430 \u043d\u0435 \u0442\u043e\u0447\u043d\u0443 \u0441\u0443\u043c\u0443. \u0410\u0431\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u00ab\u0412 \u043d\u0430\u044f\u0432\u043d\u043e\u0441\u0442\u0456\u00bb, \u044f\u043a\u0449\u043e \u0432\u0438 \u0445\u043e\u0447\u0435\u0442\u0435 \u043f\u0440\u0438\u0445\u043e\u0432\u0430\u0442\u0438 \u043d\u043e\u043c\u0435\u0440.<\/p>\n<p>\u0424\u0456\u043b\u044c\u0442\u0440 \u0434\u043b\u044f \u0446\u044c\u043e\u0433\u043e \u0454, <code>woocommerce_get_stock_html<\/code>\u0456 \u044f\u043a\u0449\u043e \u0432\u0438 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u0435 \u0434\u0440\u0443\u0433\u0438\u0439 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442, \u0432\u0438 \u043e\u0442\u0440\u0438\u043c\u0430\u0454\u0442\u0435 \u043e\u0431\u2019\u0454\u043a\u0442 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0443. \u0417 \u043e\u0431\u2019\u0454\u043a\u0442\u043e\u043c \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0443 \u0432\u0438 \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u0438\u043a\u043e\u043d\u0443\u0432\u0430\u0442\u0438 \u043d\u0435\u043e\u0431\u0445\u0456\u0434\u043d\u0456 \u043e\u043f\u0435\u0440\u0430\u0446\u0456\u0457 \u0434\u043b\u044f \u0442\u043e\u0447\u043d\u043e\u0433\u043e \u043d\u0430\u043b\u0430\u0448\u0442\u0443\u0432\u0430\u043d\u043d\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0443. \u041c\u0430\u0439\u0442\u0435 \u043d\u0430 \u0443\u0432\u0430\u0437\u0456, \u0449\u043e \u0432\u0438\u0445\u0456\u0434\u043d\u0456 \u0434\u0430\u043d\u0456, \u044f\u043a\u0456 \u043c\u043e\u0436\u043d\u0430 \u0444\u0456\u043b\u044c\u0442\u0440\u0443\u0432\u0430\u0442\u0438, \u0437\u0430\u0433\u043e\u0440\u043d\u0443\u0442\u0456 \u0432\u0441\u0435\u0440\u0435\u0434\u0438\u043d\u0443 <code>&lt;p&gt;<\/code>\u0435\u043b\u0435\u043c\u0435\u043d\u0442\u0430, \u0456 \u0432\u0430\u0448\u0456 \u0432\u0438\u0445\u0456\u0434\u043d\u0456 \u0434\u0430\u043d\u0456 \u0442\u0430\u043a\u043e\u0436 \u043c\u0430\u044e\u0442\u044c \u0431\u0443\u0442\u0438 \u0437\u0430\u0433\u043e\u0440\u043d\u0443\u0442\u0456.<\/p>\n<p>\u0414\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u0432\u0456\u0434\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f \u00ab\u0412 \u043d\u0430\u044f\u0432\u043d\u043e\u0441\u0442\u0456\u00bb \u0430\u0431\u043e \u00ab\u041d\u0435\u043c\u0430\u0454 \u0432 \u043d\u0430\u044f\u0432\u043d\u043e\u0441\u0442\u0456\u00bb \u0446\u044c\u043e\u0433\u043e \u0431\u0443\u0434\u0435 \u0434\u043e\u0441\u0442\u0430\u0442\u043d\u044c\u043e:<\/p>\n<pre><code>add_filter('woocommerce_get_stock_html', function($html, $product) {\n    if ($product-&gt;is_in_stock()) {\n        return sprintf('&lt;p class=\"stock in-stock\"&gt;%s&lt;\/p&gt;', __('In stock', 'txtdomain'));\n    } else {\n        return sprintf('&lt;p class=\"stock out-of-stock\"&gt;%s&lt;\/p&gt;', __('Out of stock', 'txtdomain'));\n    }\n    return $html;\n}, 10, 2);<\/code><\/pre>\n<p>\u0412\u0456\u0434\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f \u0437\u0430\u043f\u0430\u0441\u0456\u0432 \u0443 \u00ab\u0434\u0456\u0430\u043f\u0430\u0437\u043e\u043d\u0456 \u0437\u043d\u0430\u0447\u0435\u043d\u044c\u00bb \u043c\u043e\u0436\u043d\u0430 \u0437\u0440\u043e\u0431\u0438\u0442\u0438 \u0442\u0430\u043a:<\/p>\n<pre><code>add_filter('woocommerce_get_stock_html', function($html, $product) {\n    $current_stock = $product-&gt;get_stock_quantity();\n    if ($current_stock &lt;= 0) {\n        $new_html = __('Out of stock', 'txtdomain');\n    } else if ($current_stock &gt; 500) {\n        $new_html = sprintf('500+ %s', __('in stock', 'txtdomain'));\n    } else if ($current_stock &gt; 100) {\n        $new_html = sprintf('100+ %s', __('in stock', 'txtdomain'));\n    } else if ($current_stock &gt; 20) {\n        $new_html = sprintf('20+ %s', __('in stock', 'txtdomain'));\n    } else {\n        $new_html = __('In stock', 'txtdomain');\n    }\n    return sprintf('&lt;p class=\"stock\"&gt;%s&lt;\/p&gt;', $new_html);\n}, 10, 2);<\/code><\/pre>\n<h2>\u041f\u0435\u0440\u0435\u0439\u043c\u0435\u043d\u0443\u0432\u0430\u0442\u0438 \u0441\u0442\u0430\u0442\u0443\u0441\u0438 \u0437\u0430\u043c\u043e\u0432\u043b\u0435\u043d\u044c<\/h2>\n<p>\u0406\u043d\u043e\u0434\u0456 \u043a\u043b\u0456\u0454\u043d\u0442 \u0445\u043e\u0447\u0435, \u0449\u043e\u0431 \u0440\u0456\u0437\u043d\u0456 \u043c\u0456\u0442\u043a\u0438 \u043d\u0430 \u0441\u0442\u0430\u0442\u0443\u0441\u0430\u0445 \u0437\u0430\u043c\u043e\u0432\u043b\u0435\u043d\u043d\u044f \u0431\u0443\u043b\u0438 \u0431\u0456\u043b\u044c\u0448 \u0437\u0440\u043e\u0437\u0443\u043c\u0456\u043b\u0438\u043c\u0438 \u0432\u0456\u0434\u043f\u043e\u0432\u0456\u0434\u043d\u043e \u0434\u043e \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0438 \u0457\u0445\u043d\u044c\u043e\u0433\u043e \u0432\u0435\u0431-\u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0443. \u041d\u0430\u043f\u0440\u0438\u043a\u043b\u0430\u0434, \u0432\u0438 \u043c\u043e\u0436\u0435\u0442\u0435 \u0437\u043c\u0456\u043d\u0438\u0442\u0438 \u043d\u0430\u0437\u0432\u0443 \u00ab\u041d\u0430 \u0443\u0442\u0440\u0438\u043c\u0430\u043d\u043d\u0456\u00bb \u043d\u0430 \u00ab\u041d\u0435\u043d\u0430\u0434\u0456\u0441\u043b\u0430\u043d\u0456\u00bb \u0430\u0431\u043e \u00ab\u0417\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0435\u00bb \u043d\u0430 \u00ab\u041d\u0430\u0434\u0456\u0441\u043b\u0430\u043d\u0456\u00bb. \u0429\u043e\u0431 \u0437\u0440\u043e\u0437\u0443\u043c\u0456\u0442\u0438, \u044f\u043a\u0456 \u0437\u0430\u043c\u043e\u0432\u043b\u0435\u043d\u043d\u044f \u043f\u043e\u0442\u0440\u0456\u0431\u043d\u043e \u043d\u0430\u0434\u0456\u0441\u043b\u0430\u0442\u0438, \u0430 \u044f\u043a\u0456 \u0432\u0436\u0435 \u043d\u0430\u0434\u0456\u0441\u043b\u0430\u043d\u043e. WooCommerce \u043f\u0440\u043e\u043f\u043e\u043d\u0443\u0454 \u043f\u0440\u043e\u0441\u0442\u0438\u0439 \u0444\u0456\u043b\u044c\u0442\u0440 <code>wc_order_statuses<\/code>\u0437\u0430 \u043d\u0430\u0437\u0432\u0430\u043c\u0438 \u0432\u0441\u0456\u0445 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0438\u0445 \u0441\u0442\u0430\u0442\u0443\u0441\u0456\u0432 \u0437\u0430\u043c\u043e\u0432\u043b\u0435\u043d\u044c.<\/p>\n<pre><code>add_filter('wc_order_statuses', function($order_statuses) {\n    $order_statuses['wc-on-hold'] = __('Unsent', 'txtdomain');\n    $order_statuses['wc-completed'] = __('Sent', 'txtdomain');\n    return $order_statuses;\n});<\/code><\/pre>\n<p>\u0414\u043e\u0441\u0442\u0443\u043f\u043d\u0456 \u043a\u043b\u0430\u0432\u0456\u0448\u0456 <code>wc-pending<\/code>, <code>wc-processing<\/code>, <code>wc-on-hold<\/code>, <code>wc-completed<\/code>, <code>wc-cancelled<\/code>, <code>wc-refunded<\/code>\u0442\u0430 <code>wc-failed<\/code>.<\/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=\"\/\/awhitepixel.com\" class=\"external external_icon\">awhitepixel.com<\/a><\/div><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u041a\u0456\u043b\u044c\u043a\u0430 \u043d\u0435\u0432\u0435\u043b\u0438\u043a\u0438\u0445, \u0430\u043b\u0435 \u043a\u043e\u0440\u0438\u0441\u043d\u0438\u0445 \u043f\u0440\u0438\u043a\u043b\u0430\u0434\u0456\u0432 \u043a\u043e\u0434\u0443, \u0430-\u0445\u0430 \u0442\u0430 \u0456\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0456\u0439 \u0449\u043e\u0434\u043e \u0437\u0430\u0433\u0430\u043b\u044c\u043d\u0438\u0445 \u0437\u043c\u0456\u043d \u0440\u0456\u0437\u043d\u0438\u0445 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u0438\u0445 \u0432\u0438\u0432\u043e\u0434\u0456\u0432 \u0443 WordPress WooCommerce.<\/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":[902,1110,819,849,859,859,869,869,902,849,819],"tags":[1174],"class_list":["post-233345","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-kod-3","category-n-a","category-plahiny","category-pidruchnyky","category-woocommerce-10","category-wordpress-10","tag-affiai-uk"],"_links":{"self":[{"href":"https:\/\/wordpress.mediadoma.com\/uk\/wp-json\/wp\/v2\/posts\/233345","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=233345"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.mediadoma.com\/uk\/wp-json\/wp\/v2\/posts\/233345\/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=233345"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wordpress.mediadoma.com\/uk\/wp-json\/wp\/v2\/categories?post=233345"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wordpress.mediadoma.com\/uk\/wp-json\/wp\/v2\/tags?post=233345"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}