We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
See https://wordpress.org/support/topic/expire-users-not-working-with-woocommerce-registration-form?replies=2#post-7232639
The text was updated successfully, but these errors were encountered:
Possibly need to use this hook: 'woocommerce_created_customer' http://docs.woothemes.com/wc-apidocs/source-function-wc_create_new_customer.html#115
Something like the following (note: completely un-tested):
<?php function expire_user_woocommerce_created_customer( $customer_id, $new_customer_data, $password_generated ) { global $expire_users; if ( ! class_exists( 'Expire_User' ) ) { return; } $expire_settings = $expire_users->admin->settings->get_default_expire_settings(); $expire_data = array( 'expire_user_date_type' => $expire_settings['expire_user_date_type'], 'expire_user_date_in_num' => $expire_settings['expire_user_date_in_num'], 'expire_user_date_in_block' => $expire_settings['expire_user_date_in_block'], 'expire_user_date_on_timestamp' => $expire_settings['expire_timestamp'], 'expire_user_role' => $expire_settings['expire_user_role'], 'expire_user_reset_password' => $expire_settings['expire_user_reset_password'], 'expire_user_email' => $expire_settings['expire_user_email'], 'expire_user_email_admin' => $expire_settings['expire_user_email_admin'], 'expire_user_remove_expiry' => $expire_settings['expire_user_remove_expiry'] ); $user = new Expire_User( $customer_id ); $user->set_expire_data( $expire_data ); $user->save_user(); } add_action( 'woocommerce_created_customer', 'expire_user_woocommerce_created_customer', 10, 3 ); ?>
Sorry, something went wrong.
Can you clarify in which file I should place this?
https://wordpress.org/support/topic/woocommerce-438/
No branches or pull requests
See https://wordpress.org/support/topic/expire-users-not-working-with-woocommerce-registration-form?replies=2#post-7232639
The text was updated successfully, but these errors were encountered: