Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Uses the "New Customer" email template by WooCommerce when a new user is created via the WP Job Manager. Add to your themes functions.php
<?php
function wp_job_manager_notify_new_user( $user_id, $password ){
global $wp_version;
$wc_emails = WC_Emails::instance();
if ( empty($wc_emails)) {
return;
}
if ( version_compare( $wp_version, '4.3.1', '<' ) ) {
$wc_emails->customer_new_account( $user_id, array( 'user_pass' => $password ), $password_generated = true );
} else {
$wc_emails->customer_new_account( $user_id );
wp_new_user_notification( $user_id, null, 'admin' );
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.