WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce - excelling eCommerce
[resolved] Woocommerce Emails (18 posts)

  1. omcg33
    Member
    Posted 10 months ago #

    Woocommerce plugin does not send emails to admin or to customer.
    It does not send emails about new order(payment in cash) or another events.
    Default wordpress email functions are working(send me email about new user or received password).

    What I do wrong?

    http://wordpress.org/plugins/woocommerce/

  2. Roy Ho
    Member
    Posted 10 months ago #

  3. omcg33
    Member
    Posted 10 months ago #

    This plugin is installed and work perfectly. But woocommerce does not send emails (((

  4. Marcoscavd
    Member
    Posted 10 months ago #

    Oi estou com o mesmo problema no woocommerce.
    alguma solução?

  5. esmi
    Forum Moderator
    Posted 10 months ago #

    These are English language forums, so please use English. Alternatively, use a WP support forum in your language.

  6. Marcoscavd
    Member
    Posted 10 months ago #

    Hi I am having the same problem not WooCommerce.
    any solution?

  7. esmi
    Forum Moderator
    Posted 10 months ago #

    @Marcoscavd: As per the Forum Welcome, please post your own topic.

  8. omcg33
    Member
    Posted 10 months ago #

    I think I'll have to write yourself a function call to send letters

  9. prepu
    Member
    Posted 10 months ago #

    I have the same problem since I have updated from 2.0.13 to 2.0.14. There is something that has broken the sending emails in woocommerce. I have tried with de wp mail smtp as well...

  10. omcg33
    Member
    Posted 10 months ago #

    Standart 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

  11. prepu
    Member
    Posted 10 months ago #

    I don't know what have happened but I am thinking in downgrade to 2.0.13...

  12. omcg33
    Member
    Posted 10 months ago #

    Did you do it?

  13. prepu
    Member
    Posted 10 months ago #

    I did it but still not working...

  14. omcg33
    Member
    Posted 10 months ago #

    OH !!! I think I'll have to write yourself a function call to send letters

  15. prepu
    Member
    Posted 10 months ago #

    I don't understand why have happened that... If you find a solution tell me, please...

  16. omcg33
    Member
    Posted 10 months ago #

    I 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.

  17. prepu
    Member
    Posted 10 months ago #

    I have to tell you that I've discovered that is not only a problem of woocommerce. It doesn't work in wordpress and it happened to a friend in another server as well.
    I tried the "check email" plugin to send testing emails and I didn't work.

  18. omcg33
    Member
    Posted 10 months ago #

    Hmmm. plugin wp smtp mailer works perfectly.
    try it

  19. omcg33
    Member
    Posted 10 months ago #

    The 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.

Reply

You must log in to post.

About this Plugin

About this Topic