{"id":5925,"date":"2021-04-30T07:34:54","date_gmt":"2021-04-30T07:34:54","guid":{"rendered":"https:\/\/musilda.cz\/?p=5925"},"modified":"2021-04-30T07:34:54","modified_gmt":"2021-04-30T07:34:54","slug":"zobrazeni-odpovidajiciho-textu-na-dekovne-strance-pri-platbe-na-dobirku","status":"publish","type":"post","link":"https:\/\/affinite.io\/cs\/zobrazeni-odpovidajiciho-textu-na-dekovne-strance-pri-platbe-na-dobirku\/","title":{"rendered":"Zobrazen\u00ed odpov\u00eddaj\u00edc\u00edho textu na d\u011bkovn\u00e9 str\u00e1nce p\u0159i platb\u011b na dob\u00edrku"},"content":{"rendered":"\n

Kdy\u017e se po vytvo\u0159en\u00ed objedn\u00e1vky dostanete na d\u011bkovnou str\u00e1nku, serv\u00edruje v\u00e1m WooCommerce pod\u011bkov\u00e1n\u00ed, kter\u00e9 je stejn\u00e9 pro v\u0161echny objedn\u00e1vky, bez ohledu na platebn\u00ed, nebo dopravn\u00ed metodu. Zm\u011bn\u00edme to.<\/p>\n\n\n\n

Pro zm\u011bnu d\u011bkovn\u00e9ho textu pot\u0159ebujete v\u011bd\u011bt, jak\u00e1 platebn\u00ed metoda byla pou\u017eita. Dopravn\u00ed metodu \u0159e\u0161it nebudeme, zat\u00edm bude sta\u010dit, \u017ee se pro dob\u00edrku nebude zobrazovat – d\u011bkujeme \u017ee zaplat\u00edte, nebo podobn\u00fd nesmysl. <\/p>\n\n\n\n

WooCommerce m\u00e1 na d\u011bkovn\u00e9m textu filtr woocommerce_thankyou_order_received_text, kter\u00fd se n\u00e1m hod\u00ed a pou\u017eijeme ho. <\/p>\n\n\n\n

D\u00e1le pot\u0159ebujeme v\u011bd\u011bt o jakou platebn\u00ed metodu jde. Filtr obsahuje jako druhou prom\u011bnnou objekt objedn\u00e1vky, tak\u017ee zavol\u00e1me $order->get_payment_method() a z\u00edsk\u00e1me id platebn\u00ed metody. <\/p>\n\n\n\n

A to v\u0161echno d\u00e1me do jednoduch\u00e9ho snippetu, kter\u00fd n\u00e1m v p\u0159\u00edpad\u011b dob\u00edrky vyp\u00ed\u0161e vlastn\u00ed text. <\/p>\n\n\n\n\n\n\n\n

Tak zase p\u0159\u00ed\u0161t\u011b u n\u011bjak\u00e9ho dal\u0161\u00edho tipu. <\/p>\n\n\n\n

Dal\u0161\u00ed u\u017eite\u010dn\u00e9 snippety najdete na str\u00e1nce U\u017eite\u010dn\u00e9 snippety pro WooCommerce<\/a><\/strong> <\/p>\n","protected":false},"excerpt":{"rendered":"

Kdy\u017e se po vytvo\u0159en\u00ed objedn\u00e1vky dostanete na d\u011bkovnou str\u00e1nku, serv\u00edruje v\u00e1m WooCommerce pod\u011bkov\u00e1n\u00ed, kter\u00e9 je stejn\u00e9 pro v\u0161echny objedn\u00e1vky, bez ohledu na platebn\u00ed, nebo dopravn\u00ed metodu. Zm\u011bn\u00edme to. Pro zm\u011bnu d\u011bkovn\u00e9ho textu pot\u0159ebujete v\u011bd\u011bt, jak\u00e1 platebn\u00ed metoda byla pou\u017eita. Dopravn\u00ed metodu \u0159e\u0161it nebudeme, zat\u00edm bude sta\u010dit, \u017ee se pro dob\u00edrku nebude zobrazovat – d\u011bkujeme \u017ee<\/p>\n","protected":false},"author":1,"featured_media":5600,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_lock_modified_date":false,"footnotes":""},"categories":[29],"tags":[],"class_list":["post-5925","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-woocommerce-snippety"],"_links":{"self":[{"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/posts\/5925"}],"collection":[{"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/comments?post=5925"}],"version-history":[{"count":0,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/posts\/5925\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/media\/5600"}],"wp:attachment":[{"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/media?parent=5925"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/categories?post=5925"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/tags?post=5925"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}