WordPress.org

Ready to get started?Download WordPress

Forums

Payment methode check (2 posts)

  1. Chrissiechris
    Member
    Posted 11 months ago #

    Hi,

    For an woocommerce online order shop i'm trying to check when a customer pays with ideal or used the payment methode "pay on delivery".

    When the customer used ideal the message "customer already paid" shown on the new order email.

    When the customer used "pay on delivery" the message "customer must still pay" appears.

    How can i check which payment methode is used?

    Thanks in advance

  2. Chrissiechris
    Member
    Posted 11 months ago #

    Something like this.

    add_action( 'woocommerce_email_after_order_table', 'add_payment_method_to_admin_new_order', 15, 2 );
    
    function add_payment_method_to_admin_new_order( $order, $is_admin_email ) {
    	if ($order->payment_method == ‘cod’){
        	echo '<p><strong>pay on delivery</strong></p>';
    	}
    }

    Can some one help me to make this work?

    Thanks in advance,

    Chris

Reply

You must log in to post.

About this Topic