{"id":4021,"date":"2020-11-29T18:30:59","date_gmt":"2020-11-29T18:30:59","guid":{"rendered":"https:\/\/www.s-sols.com\/?post_type=doc&#038;p=4021"},"modified":"2022-09-15T10:59:04","modified_gmt":"2022-09-15T10:59:04","slug":"api-wd","status":"publish","type":"doc","link":"https:\/\/www.s-sols.com\/ru\/docs\/wordpress\/woo-discount\/getting-started-wd\/api-wd","title":{"rendered":"API \u041e\u043f\u0442\u043e\u0432\u044b\u0435 \u0441\u043a\u0438\u0434\u043a\u0438 \u0434\u043b\u044f WooCommerce \u0434\u043b\u044f WordPress"},"content":{"rendered":"<p>\n  \u0412 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u0435\u0441\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f. \u0415\u0451 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u0442\u0435\u043c\u0435 \u0441\u0430\u0439\u0442\u0430 \u0438\u043b\u0438 \u0432 \u0434\u0440\u0443\u0433\u043e\u043c \u043f\u043b\u0430\u0433\u0438\u043d\u0435.\n<\/p>\n<h2>\n  seraph_wd\\API::AdjustPrice()<br \/>\n<\/h2>\n<p><strong>seraph_wd\\API::AdjustPrice( $product, $price, $attrs )<\/strong>\n<\/p>\n<p>\n  \u041e\u043d\u0430 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u0443\u0435\u0442 <strong>$price<\/strong> \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u043c \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u043c <strong>$product<\/strong> \u0438 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430\u043c\u0438 <strong>$attrs<\/strong>. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, seraph_wd\\API::AdjustPrice( $product, 50, array( &#8216;quantity&#8217; =&gt; 10 ) ).\n<\/p>\n<p>\n  \u041f\u0440\u0438\u043c\u0435\u0440 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u044d\u0442\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 <a href=\"\/ru\/products\/wordpress\/woo-discount#offer\">\u043d\u0430\u0448\u0435\u043c \u0441\u0430\u0439\u0442\u0435<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0412 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u0435\u0441\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f. \u0415\u0451 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u0442\u0435\u043c\u0435 \u0441\u0430\u0439\u0442\u0430 \u0438\u043b\u0438 \u0432 \u0434\u0440\u0443\u0433\u043e\u043c \u043f\u043b\u0430\u0433\u0438\u043d\u0435. seraph_wd\\API::AdjustPrice() seraph_wd\\API::AdjustPrice( $product, $price, $attrs ) \u041e\u043d\u0430 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u0443\u0435\u0442 $price \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u043c \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u043c $product \u0438 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430\u043c\u0438 $attrs. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, seraph_wd\\API::AdjustPrice( $product, 50, array( &#8216;quantity&#8217; =&gt; 10 ) ). \u041f\u0440\u0438\u043c\u0435\u0440 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u044d\u0442\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 \u043d\u0430\u0448\u0435\u043c&#8230;<\/p>\n","protected":false},"author":18,"featured_media":0,"parent":1777,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"rank_math_lock_modified_date":false},"categories":[301],"tags":[],"class_list":["post-4021","doc","type-doc","status-publish","hentry","category-woo-discount"],"_links":{"self":[{"href":"https:\/\/www.s-sols.com\/ru\/api\/wp\/v2\/doc\/4021","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.s-sols.com\/ru\/api\/wp\/v2\/doc"}],"about":[{"href":"https:\/\/www.s-sols.com\/ru\/api\/wp\/v2\/types\/doc"}],"author":[{"embeddable":true,"href":"https:\/\/www.s-sols.com\/ru\/api\/wp\/v2\/users\/18"}],"replies":[{"embeddable":true,"href":"https:\/\/www.s-sols.com\/ru\/api\/wp\/v2\/comments?post=4021"}],"up":[{"embeddable":true,"href":"https:\/\/www.s-sols.com\/ru\/api\/wp\/v2\/doc\/1777"}],"wp:attachment":[{"href":"https:\/\/www.s-sols.com\/ru\/api\/wp\/v2\/media?parent=4021"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.s-sols.com\/ru\/api\/wp\/v2\/categories?post=4021"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.s-sols.com\/ru\/api\/wp\/v2\/tags?post=4021"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}