{"id":5059,"date":"2018-10-17T12:33:26","date_gmt":"2018-10-17T12:33:26","guid":{"rendered":"https:\/\/musilda.cz\/?p=5059"},"modified":"2018-10-17T12:33:26","modified_gmt":"2018-10-17T12:33:26","slug":"jak-pridat-do-akci-objednavky-znovu-odeslani-emailu-o-nove-objednavce-pro-admina","status":"publish","type":"post","link":"https:\/\/affinite.io\/cs\/jak-pridat-do-akci-objednavky-znovu-odeslani-emailu-o-nove-objednavce-pro-admina\/","title":{"rendered":"Jak p\u0159idat do akc\u00ed objedn\u00e1vky znovu odesl\u00e1n\u00ed emailu o nov\u00e9 objedn\u00e1vce pro admina?"},"content":{"rendered":"

Mo\u017en\u00e1 jste si toho v\u0161imli, ale od verze 3.2, nen\u00ed ve WooCommerce mo\u017enost, znovu odeslat email o nov\u00e9 objedn\u00e1vce pro admina. A proto\u017ee jsem pot\u0159eboval ladit vzhled konkr\u00e9tn\u011b tohoto emailu, musel jsem si do akc\u00ed, znovu p\u0159idat tuto mo\u017enost.<\/p>\n

Jako v\u017edy, je to pom\u011brn\u011b jednoduch\u00e9, sta\u010d\u00ed p\u0159idat p\u00e1r \u0159\u00e1dk\u016f k\u00f3du do functions.php, nebo do pluginu.<\/p>\n

\/**
\n* Filter to add a new menu to the dropdown
\n*
\n* @param array $actions
\n* @return array
\n*\/
\nfunction add_resend_admin_order_email_action( $actions ) {
\n$actions[‚send_admin_order_details‘] = __( ‚Email order details to Admin‘, ‚woocommerce‘ );
\nreturn $actions;
\n}
\nadd_filter( ‚woocommerce_order_actions‘, ‚add_resend_admin_order_email_action‘, 10, 1 );
\n\/**
\n* Hook into newly added send_admin_order_details to handle sending of admin emails
\n*
\n* @param $order Order object
\n* @return void
\n*\/
\nfunction resend_send_admin_order_email( $order ) {
\n\/\/ Send the admin new order email.
\nWC()->payment_gateways();
\nWC()->shipping();
\nWC()->mailer()->emails[‚WC_Email_New_Order‘]->trigger( $order->get_id(), $order );
\n\/\/ Note the event.
\n$order->add_order_note( __( ‚Order details manually sent to admin.‘, ‚woocommerce‘ ), false, true );
\ndo_action( ‚woocommerce_after_resend_order_email‘, $order, ‚new_order‘ );
\n\/\/ Change the post saved message.
\nadd_filter( ‚redirect_post_location‘, array( ‚WC_Meta_Box_Order_Actions‘, ‚set_email_sent_message‘ ) );
\n}
\nadd_action( ‚woocommerce_order_action_send_admin_order_details‘, ‚resend_send_admin_order_email‘, 10, 1 );<\/p><\/blockquote>\n

A proto\u017ee mi blog v\u017edycky rozh\u00e1z\u00ed form\u00e1tov\u00e1n\u00ed, odkaz na Github<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"

Mo\u017en\u00e1 jste si toho v\u0161imli, ale od verze 3.2, nen\u00ed ve WooCommerce mo\u017enost, znovu odeslat email o nov\u00e9 objedn\u00e1vce pro admina. A proto\u017ee jsem pot\u0159eboval ladit vzhled konkr\u00e9tn\u011b tohoto emailu, musel jsem si do akc\u00ed, znovu p\u0159idat tuto mo\u017enost. Jako v\u017edy, je to pom\u011brn\u011b jednoduch\u00e9, sta\u010d\u00ed p\u0159idat p\u00e1r \u0159\u00e1dk\u016f k\u00f3du do functions.php, nebo do pluginu.<\/p>\n","protected":false},"author":1,"featured_media":8732,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[25,28],"tags":[],"class_list":["post-5059","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-woocommerce","category-woocommerce-reseni-problemu"],"_links":{"self":[{"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/posts\/5059"}],"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=5059"}],"version-history":[{"count":0,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/posts\/5059\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/media\/8732"}],"wp:attachment":[{"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/media?parent=5059"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/categories?post=5059"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/tags?post=5059"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}