Viewing 15 replies - 1 through 15 (of 18 total)
  • Roy Ho

    (@splashingpixelscom)

    Thread Starter omcg33

    (@omcg33)

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

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

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

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

    Thread Starter omcg33

    (@omcg33)

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

    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…

    Thread Starter omcg33

    (@omcg33)

    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

    I don’t know what have happened but I am thinking in downgrade to 2.0.13…

    Thread Starter omcg33

    (@omcg33)

    Did you do it?

    I did it but still not working…

    Thread Starter omcg33

    (@omcg33)

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

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

    Thread Starter omcg33

    (@omcg33)

    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.

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘Woocommerce Emails’ is closed to new replies.