omcg33
Forum Replies Created
-
Forum: Plugins
In reply to: [WooCommerce] Woocommerce EmailsThe problem is that in woocommerce only two call of email function(on register new customer and some other)
ANd no call function for new order.
Forum: Plugins
In reply to: [WooCommerce] Woocommerce EmailsHmmm. plugin wp smtp mailer works perfectly.
try itForum: Plugins
In reply to: [WooCommerce] Woocommerce EmailsI found a custom solution.
I just find class-wc-gateway-cod.php in /plugin/woocommerce/classes/gateways directory.
This class work this “payment in cash”.
When find
function process_payment
And if in it you see
$order->update_status('on-hold'
it is mean ,that this function works when you get a new order.old function:
function process_payment ($order_id) { global $woocommerce; $order = new WC_Order( $order_id ); // Mark as on-hold (we're awaiting the cheque) $order->update_status('on-hold', __( 'Payment to be made upon delivery.', 'woocommerce' )); // Reduce stock levels $order->reduce_order_stock(); // Remove cart $woocommerce->cart->empty_cart(); // Return thankyou redirect return array( 'result' => 'success', 'redirect' => add_query_arg('key', $order->order_key, add_query_arg('order', $order_id, get_permalink(woocommerce_get_page_id('thanks')))) ); }
New function:
function process_payment ($order_id) { global $woocommerce; $order = new WC_Order( $order_id ); // Mark as on-hold (we're awaiting the cheque) $order->update_status('on-hold', __( 'Payment to be made upon delivery.', 'woocommerce' )); $mailer = $woocommerce->mailer(); $mailer->emails['WC_Email_New_Order']->trigger($order_id); // Reduce stock levels $order->reduce_order_stock(); // Remove cart $woocommerce->cart->empty_cart(); // Return thankyou redirect return array( 'result' => 'success', 'redirect' => add_query_arg('key', $order->order_key, add_query_arg('order', $order_id, get_permalink(woocommerce_get_page_id('thanks')))) ); }
where ‘WC_Email_New_Order’ it is a type of email.
Forum: Plugins
In reply to: [WooCommerce] Woocommerce EmailsOH !!! I think I’ll have to write yourself a function call to send letters
Forum: Plugins
In reply to: [WooCommerce] Woocommerce EmailsDid you do it?
Forum: Plugins
In reply to: [WooCommerce] Woocommerce EmailsStandart woocommerce function of sending email working well( i just call it in HEADER). I think there are no call of the function in woocommerce on all events
Forum: Plugins
In reply to: [WooCommerce] Woocommerce EmailsI think I’ll have to write yourself a function call to send letters
Forum: Plugins
In reply to: [WooCommerce] Woocommerce EmailsThis plugin is installed and work perfectly. But woocommerce does not send emails (((