{"id":220213,"date":"2023-02-12T14:38:00","date_gmt":"2023-02-12T11:38:00","guid":{"rendered":"https:\/\/wordpress.mediadoma.com\/?p=220213"},"modified":"2022-08-10T03:29:43","modified_gmt":"2022-08-10T00:29:43","slug":"kak-izmenit-rasprostranennye-teksty-woocommerce-s-pomoshhju-koda","status":"publish","type":"post","link":"https:\/\/wordpress.mediadoma.com\/ru\/kak-izmenit-rasprostranennye-teksty-woocommerce-s-pomoshhju-koda\/","title":{"rendered":"\u041a\u0430\u043a \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u043d\u044b\u0435 \u0442\u0435\u043a\u0441\u0442\u044b WooCommerce \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u0434\u0430"},"content":{"rendered":"\n<p>WooCommerce \u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u043c\u0438, \u043a\u0440\u044e\u0447\u043a\u0430\u043c\u0438 \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043c\u043e\u0433\u0443\u0442 \u0432\u0430\u043c \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043b\u0430\u0433\u0438\u043d \u0432 \u0432\u0430\u0448\u0435\u0439 \u0442\u0435\u043c\u0435 \u0438\u043b\u0438 \u043f\u043b\u0430\u0433\u0438\u043d\u0435. \u0412\u043e\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0445, \u043d\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u043a\u043e\u0434\u0430, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0441\u043e\u0432\u0435\u0442\u044b \u0438 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0438 \u043f\u043e \u043e\u0431\u0449\u0438\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u043c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0445 \u0432\u044b\u0445\u043e\u0434\u043e\u0432.<\/p>\n<h2>\u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0442\u0435\u043a\u0441\u0442\u0430 \u043a\u043d\u043e\u043f\u043a\u0438 \u00ab\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u043a\u043e\u0440\u0437\u0438\u043d\u0443\u00bb<\/h2>\n<p>\u0415\u0441\u0442\u044c \u0434\u0432\u0430 \u0444\u0438\u043b\u044c\u0442\u0440\u0430; \u043e\u0434\u0438\u043d \u0434\u043b\u044f \u0442\u0435\u043a\u0441\u0442\u0430 \u00ab\u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u043a\u043e\u0440\u0437\u0438\u043d\u0443\u00bb \u0432 \u0446\u0438\u043a\u043b\u0435 (<code>woocommerce_product_add_to_cart_text<\/code>), \u0430 \u0434\u0440\u0443\u0433\u043e\u0439 \u0434\u043b\u044f \u043a\u043d\u043e\u043f\u043a\u0438 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u043c \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0435 (<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\u043e \u0438\u043c\u0435\u0439\u0442\u0435 \u0432 \u0432\u0438\u0434\u0443, \u0447\u0442\u043e \u044d\u0442\u043e \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0432\u0441\u0435 \u0442\u0435\u043a\u0441\u0442\u044b \u00ab\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u043a\u043e\u0440\u0437\u0438\u043d\u0443\u00bb. \u0414\u0430\u0436\u0435 \u0442\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u0431\u044b\u043b\u0438 \u00ab\u0412\u044b\u0431\u0440\u0430\u0442\u044c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b\u00bb (\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0442\u043e\u0432\u0430\u0440\u044b) \u0438\u043b\u0438 \u00ab\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435\u00bb (\u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u0434\u043b\u044f \u043f\u043e\u043a\u0443\u043f\u043a\u0438 \u0442\u043e\u0432\u0430\u0440\u044b \u2014 \u043d\u0435\u0442 \u0446\u0435\u043d\u044b \u0438\u043b\u0438 \u0438\u0445 \u043d\u0435\u0442 \u0432 \u043d\u0430\u043b\u0438\u0447\u0438\u0438). \u0415\u0441\u043b\u0438 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u0430 \u0431\u043e\u043b\u0435\u0435 \u0442\u043e\u043d\u043a\u0430\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430, \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u0435 \u0432 \u044d\u0442\u0438 \u0444\u0438\u043b\u044c\u0442\u0440\u044b \u0432\u0442\u043e\u0440\u043e\u0439 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442; \u043e\u0431\u044a\u0435\u043a\u0442 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u043e\u0431\u044a\u0435\u043a\u0442 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430 \u0434\u043b\u044f \u0443\u0441\u043b\u043e\u0432\u043d\u043e\u0433\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0432\u044b\u0432\u043e\u0434\u043e\u043c. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u043e \u0442\u0438\u043f\u0443 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430 \u0438\u043b\u0438 \u043f\u043e \u0442\u043e\u043c\u0443, \u043c\u043e\u0436\u043d\u043e \u043b\u0438 \u0435\u0433\u043e \u043a\u0443\u043f\u0438\u0442\u044c:<\/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>\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0432\u044b\u0432\u043e\u0434 \u0446\u0435\u043d\u043e\u0432\u043e\u0433\u043e \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0430 \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0438 \u0441\u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432<\/h2>\n<p>\u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e WooCommerce \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c \u0441\u0430\u043c\u0443\u044e \u043d\u0438\u0437\u043a\u0443\u044e \u0438 \u0441\u0430\u043c\u0443\u044e \u0432\u044b\u0441\u043e\u043a\u0443\u044e \u0446\u0435\u043d\u0443 \u043d\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0438 \u0441\u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u044b \u0441 \u00ab-\u00bb \u043c\u0435\u0436\u0434\u0443 \u043d\u0438\u043c\u0438. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043e\u0447\u0435\u043d\u044c \u043b\u0435\u0433\u043a\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0439 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0443\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u043e\u043d \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0430\u043c\u0443\u044e \u043d\u0438\u0437\u043a\u0443\u044e \u0446\u0435\u043d\u0443 \u0432 \u0444\u043e\u0440\u043c\u0435 \u00ab\u041e\u0442:\u00bb. WooCommerce \u0438\u043c\u0435\u0435\u0442 \u043e\u0434\u0438\u043d \u0444\u0438\u043b\u044c\u0442\u0440 \u0434\u043b\u044f \u0432\u0430\u0440\u0438\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u0442\u043e\u0432\u0430\u0440\u043e\u0432 \u0438 \u0434\u0440\u0443\u0433\u043e\u0439 \u0434\u043b\u044f \u0441\u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0442\u043e\u0432\u0430\u0440\u043e\u0432, \u0442\u0430\u043a \u0447\u0442\u043e \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0438\u0445 \u043e\u0431\u0430 \u043f\u043e \u043e\u0447\u0435\u0440\u0435\u0434\u0438.<\/p>\n<p>\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0432\u044b\u0432\u043e\u0434\u043e\u043c HTML \u0446\u0435\u043d\u043e\u0432\u043e\u0433\u043e \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0430 \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u0438\u043b\u044c\u0442\u0440\u0430 <code>woocommerce_variable_price_html<\/code>. \u041e\u0431\u044a\u0435\u043a\u0442 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430.<\/p>\n<p>\u0412\u043d\u0443\u0442\u0440\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0432\u0441\u0435 \u0446\u0435\u043d\u044b. WooCommerce \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0443\u0434\u043e\u0431\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430, <code>get_variation_prices()<\/code>. \u042d\u0442\u043e \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043c\u0430\u0441\u0441\u0438\u0432 \u0432\u0441\u0435\u0445 \u0446\u0435\u043d \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432, \u043e\u0442\u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0432 \u043f\u043e\u0440\u044f\u0434\u043a\u0435 \u0443\u0431\u044b\u0432\u0430\u043d\u0438\u044f. \u0412\u0441\u0435, \u0447\u0442\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u044d\u0442\u043e \u0438\u0437\u0432\u043b\u0435\u0447\u044c \u043f\u0435\u0440\u0432\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0438\u0437 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0446\u0435\u043d \u0438 \u043a\u0440\u0430\u0441\u0438\u0432\u043e \u0435\u0433\u043e \u0432\u044b\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>\u0412\u044b\u0445\u043e\u0434\u043d\u043e\u0439 HTML-\u0444\u0438\u043b\u044c\u0442\u0440 \u0446\u0435\u043d\u043e\u0432\u043e\u0433\u043e \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0430 \u0434\u043b\u044f \u0441\u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0442\u043e\u0432\u0430\u0440\u043e\u0432 \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u0445\u043e\u0436 \u043d\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0442\u043e\u0432\u0430\u0440\u044b, \u043d\u043e \u0441 \u043e\u0434\u043d\u0438\u043c \u043e\u0442\u043b\u0438\u0447\u0438\u0435\u043c: \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 \u0444\u0438\u043b\u044c\u0442\u0440\u0443 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442\u0441\u044f \u043c\u0430\u0441\u0441\u0438\u0432 \u0446\u0435\u043d \u0432\u0441\u0435\u0445 \u0441\u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u00ab\u0434\u0435\u0442\u0441\u043a\u0438\u0445\u00bb \u0442\u043e\u0432\u0430\u0440\u043e\u0432. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0439 \u0444\u0438\u043b\u044c\u0442\u0440 <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>\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0432\u044b\u0432\u043e\u0434 \u0442\u0435\u043a\u0441\u0442\u0430 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0437\u0430\u043f\u0430\u0441\u043e\u0432<\/h2>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0437\u0430\u043f\u0430\u0441\u043e\u0432 \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 WooCommerce, \u043e\u043d \u0434\u043e\u043b\u0436\u0435\u043d \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c \u0442\u043e\u0447\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043e\u0441\u0442\u0430\u0432\u0448\u0438\u0445\u0441\u044f \u0437\u0430\u043f\u0430\u0441\u043e\u0432 \u0432 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u043e\u0434\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u00ab42 \u0432 \u043d\u0430\u043b\u0438\u0447\u0438\u0438\u00bb). \u041e\u0434\u043d\u0430\u043a\u043e \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0432\u044b\u0432\u043e\u0434, \u0447\u0442\u043e\u0431\u044b \u0432\u043c\u0435\u0441\u0442\u043e \u044d\u0442\u043e\u0433\u043e \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u043b\u0441\u044f \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d, \u0430 \u043d\u0435 \u0442\u043e\u0447\u043d\u0430\u044f \u0441\u0443\u043c\u043c\u0430. \u0418\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u00ab\u0412 \u043d\u0430\u043b\u0438\u0447\u0438\u0438\u00bb, \u0435\u0441\u043b\u0438 \u0445\u043e\u0442\u0438\u0442\u0435 \u0441\u043a\u0440\u044b\u0442\u044c \u043d\u043e\u043c\u0435\u0440.<\/p>\n<p>\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0444\u0438\u043b\u044c\u0442\u0440, <code>woocommerce_get_stock_html<\/code>\u0438 \u0435\u0441\u043b\u0438 \u0432\u044b \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u0435 \u0432\u0442\u043e\u0440\u043e\u0439 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442, \u0432\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0435 \u043e\u0431\u044a\u0435\u043a\u0442 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430. \u0421 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u043c \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u0442\u043e\u043d\u043a\u043e\u0439 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0432\u044b\u0432\u043e\u0434\u0430. \u0418\u043c\u0435\u0439\u0442\u0435 \u0432 \u0432\u0438\u0434\u0443, \u0447\u0442\u043e \u0444\u0438\u043b\u044c\u0442\u0440\u0443\u0435\u043c\u044b\u0439 \u0432\u044b\u0432\u043e\u0434 \u043e\u0431\u0435\u0440\u043d\u0443\u0442 \u0432\u043d\u0443\u0442\u0440\u0438 <code>&lt;p&gt;<\/code>\u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430, \u0438 \u0432\u0430\u0448 \u0432\u044b\u0432\u043e\u0434 \u0442\u043e\u0436\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c.<\/p>\n<p>\u0414\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u00ab\u0412 \u043d\u0430\u043b\u0438\u0447\u0438\u0438\u00bb \u0438\u043b\u0438 \u00ab\u041d\u0435\u0442 \u0432 \u043d\u0430\u043b\u0438\u0447\u0438\u0438\u00bb \u044d\u0442\u043e\u0433\u043e \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\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>\u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0437\u0430\u043f\u0430\u0441\u0430 \u0432 \u00ab\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u0445 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0430\u00bb \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/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\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u0443\u0441\u044b \u0437\u0430\u043a\u0430\u0437\u0430<\/h2>\n<p>\u0418\u043d\u043e\u0433\u0434\u0430 \u043a\u043b\u0438\u0435\u043d\u0442 \u0445\u043e\u0447\u0435\u0442, \u0447\u0442\u043e\u0431\u044b \u0440\u0430\u0437\u043d\u044b\u0435 \u043c\u0435\u0442\u043a\u0438 \u043d\u0430 \u0441\u0442\u0430\u0442\u0443\u0441\u0430\u0445 \u0437\u0430\u043a\u0430\u0437\u043e\u0432 \u0438\u043c\u0435\u043b\u0438 \u0431\u043e\u043b\u044c\u0448\u0435 \u0441\u043c\u044b\u0441\u043b\u0430 \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u0438\u0445 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u043e\u0439 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442-\u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0430. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u0442\u044c \u00ab\u041d\u0430 \u0443\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0438\u00bb \u0432 \u00ab\u041d\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043e\u00bb \u0438\u043b\u0438 \u00ab\u0412\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043e\u00bb \u0432 \u00ab\u041e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043e\u00bb. \u041f\u0440\u043e\u0441\u0442\u043e \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043d\u044f\u0442\u044c, \u043a\u0430\u043a\u0438\u0435 \u0437\u0430\u043a\u0430\u0437\u044b \u043d\u0443\u0436\u043d\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c, \u0430 \u043a\u0430\u043a\u0438\u0435 \u0443\u0436\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u044b. WooCommerce \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0444\u0438\u043b\u044c\u0442\u0440 <code>wc_order_statuses<\/code>\u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u0441\u0442\u0430\u0442\u0443\u0441\u043e\u0432 \u0437\u0430\u043a\u0430\u0437\u043e\u0432.<\/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\u044b\u0435 \u043a\u043b\u0430\u0432\u0438\u0448\u0438: <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>\u0438 <code>wc-failed<\/code>.<\/p>\n<p><div id=\"PostUnique_PostSource\" style=\"padding-top: 50px\">\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a \u0437\u0430\u043f\u0438\u0441\u0438:  <a target=\"_blank\" rel=\"noopener nofollow\" href=\"\/\/awhitepixel.com\" class=\"external external_icon\">awhitepixel.com<\/a><\/div><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u041d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0445, \u043d\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u043a\u043e\u0434\u0430, \u0441\u043e\u0432\u0435\u0442\u044b \u0438 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0438 \u043f\u043e \u043e\u0431\u0449\u0438\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u043c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0445 \u0432\u044b\u0445\u043e\u0434\u043e\u0432 \u0432 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":[900,820,850,974,974,870,870,900,820,850],"tags":[1171],"class_list":{"0":"post-220213","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","6":"hentry","7":"category-kod-2","8":"category-plaginy-ru","9":"category-uchebniki-ru","10":"category-woocommerce-2-3","12":"category-wordpress-ru","17":"tag-affiai-ru"},"_links":{"self":[{"href":"https:\/\/wordpress.mediadoma.com\/ru\/wp-json\/wp\/v2\/posts\/220213","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.mediadoma.com\/ru\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wordpress.mediadoma.com\/ru\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.mediadoma.com\/ru\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.mediadoma.com\/ru\/wp-json\/wp\/v2\/comments?post=220213"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.mediadoma.com\/ru\/wp-json\/wp\/v2\/posts\/220213\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wordpress.mediadoma.com\/ru\/wp-json\/wp\/v2\/media\/223696"}],"wp:attachment":[{"href":"https:\/\/wordpress.mediadoma.com\/ru\/wp-json\/wp\/v2\/media?parent=220213"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wordpress.mediadoma.com\/ru\/wp-json\/wp\/v2\/categories?post=220213"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wordpress.mediadoma.com\/ru\/wp-json\/wp\/v2\/tags?post=220213"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}