Skip to content

Instantly share code, notes, and snippets.

@kharissulistiyo
Last active August 29, 2015 14:01
Show Gist options
  • Save kharissulistiyo/e32e015b86269253159a to your computer and use it in GitHub Desktop.
Save kharissulistiyo/e32e015b86269253159a to your computer and use it in GitHub Desktop.
WooCommerce: Enable Email Notification of New Order Received with Paypal Checkout.
/**
* Do this in get_paypal_args method of class-wc-gateway-paypal.php
*/
global $woocommerce;
$mailer = $woocommerce->mailer();
$email = $mailer->emails['WC_Email_New_Order'];
$send_mail = $email->trigger( $order_id );
$paypal_args = apply_filters( 'woocommerce_paypal_args', $paypal_args, $send_mail );
return $paypal_args;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment