• Resolved budkhand

    (@budkhand)


    Hello WooCommerce Support Team,

    I hope you are doing well. I am reaching out to address a specific issue I have encountered on my WooCommerce-powered website.

    Problem Description:
    Newly registered users on my website are receiving a “Password Changed” email after their first purchase. This behavior is unexpected and confusing for my customers. The “Password Changed” email is triggered simultaneously with the “Order Received” email only for new registered users, specifically on their first purchase.

    I have reviewed the solution provided on the WooCommerce support forum, which involves using the send_password_change_email filter to prevent password change emails during checkout. However, this solution did not resolve the issue.

    I conducted tests with Elementor support and confirmed that the problem persists even with all other plugins deactivated and a new theme installed.

    The issue seems to be related to WooCommerce, as it occurs only when WooCommerce is active with a basic theme.

    It appears that the problem is triggered when a new registered user makes their first purchase, and the “Password Changed” email is sent alongside the “Order Received” email.

    Possible Solution Attempt:
    I have attempted to implement a custom solution based on a code snippet, but it has not yielded the desired results. Here is the code snippet I tried:

    // Code snippet to prevent password change email on checkout
    function preventPasswordChangeEmailOnCheckout($send, $user_id) {
        if (isset($_REQUEST['woocommerce-process-checkout-nonce'])) {
            $user = get_user_by('ID', $user_id);
            if (is_a($user, 'WP_User') && in_array('contributor', $user->roles)) {
                $send = false;
            }
        }
        return $send;
    }
    add_filter('send_password_change_email', 'preventPasswordChangeEmailOnCheckout', 10, 2);
    

    I would greatly appreciate your assistance in diagnosing and resolving this issue. If you require further information or access to my website, please let me know, and I will be happy to provide it.

    The following works for other users but not for me:

    phillipswdc 

    (@phillipswdc)

    as stated above we were experiencing the same problem not for every user on our end. This is what we found…

    On checkout, while “placing order” WooCommerce is doing also customer update with data you input in form.
    This runs wp-content/plugins/woocommerce/includes/data-stores/class-wc-customer-data-store.php line 190 update method which runs ->
    wp_update_user ( wp-includes/user.php) for some reason it runs code block for password  or email change

    the fix for us was…

    https://gist.github.com/phillipswdc/0b45614c02c6923c926b5baad6e1025c

    My Website Details:

    `
    ### WordPress Environment ###
    
    WordPress address (URL): https://erdemed.com
    Site address (URL): https://erdemed.com
    WC Version: 8.0.1
    REST API Version: ? 8.0.1
    WC Blocks Version: ? 10.6.5
    Action Scheduler Version: ? 3.6.1
    Log Directory Writable: ?
    WP Version: ? 6.2.2 - There is a newer version of WordPress available (6.3)
    WP Multisite: –
    WP Memory Limit: 256 MB
    WP Debug Mode: –
    WP Cron: ?
    Language: mn
    External object cache: –
    
    ### Server Environment ###
    
    Server Info: Apache
    PHP Version: 7.4.33
    PHP Post Max Size: 150 MB
    PHP Time Limit: 30
    PHP Max Input Vars: 1000
    cURL Version: 7.74.0
    OpenSSL/1.1.1n
    
    SUHOSIN Installed: –
    MySQL Version: 5.5.5-10.11.4-MariaDB-1:10.11.4+maria~deb11-log
    Max Upload Size: 150 MB
    Default Timezone is UTC: ?
    fsockopen/cURL: ?
    SoapClient: ?
    DOMDocument: ?
    GZip: ?
    Multibyte String: ?
    Remote Post: ?
    Remote Get: ?
    
    ### Database ###
    
    WC Database Version: 8.0.1
    WC Database Prefix: Erdemed1
    Total Database Size: 903.08MB
    Database Data Size: 837.20MB
    Database Index Size: 65.88MB
    Erdemed1woocommerce_sessions: Data: 0.13MB + Index: 0.02MB + Engine InnoDB
    Erdemed1woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    Erdemed1woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    Erdemed1woocommerce_downloadable_product_permissions: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
    Erdemed1woocommerce_order_items: Data: 0.06MB + Index: 0.02MB + Engine InnoDB
    Erdemed1woocommerce_order_itemmeta: Data: 0.31MB + Index: 0.30MB + Engine InnoDB
    Erdemed1woocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
    Erdemed1woocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    Erdemed1woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    Erdemed1woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    Erdemed1woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    Erdemed1woocommerce_payment_tokens: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    Erdemed1woocommerce_payment_tokenmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    Erdemed1woocommerce_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    Erdemed1actionscheduler_actions: Data: 3.05MB + Index: 4.59MB + Engine InnoDB
    Erdemed1actionscheduler_claims: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    Erdemed1actionscheduler_groups: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    Erdemed1actionscheduler_logs: Data: 4.05MB + Index: 2.47MB + Engine InnoDB
    Erdemed1addonlibrary_addons: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    Erdemed1addonlibrary_categories: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    Erdemed1aysquiz_answers: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    Erdemed1aysquiz_categories: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    Erdemed1aysquiz_questions: Data: 0.05MB + Index: 0.00MB + Engine InnoDB
    Erdemed1aysquiz_quizcategories: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    Erdemed1aysquiz_quizes: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    Erdemed1aysquiz_rates: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    Erdemed1aysquiz_reports: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    Erdemed1aysquiz_settings: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    Erdemed1aysquiz_themes: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    Erdemed1cartflows_ca_cart_abandonment: Data: 0.11MB + Index: 0.02MB + Engine InnoDB
    Erdemed1cartflows_ca_email_history: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    Erdemed1cartflows_ca_email_templates: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    Erdemed1cartflows_ca_email_templates_meta: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    Erdemed1commentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    Erdemed1comments: Data: 0.13MB + Index: 0.09MB + Engine InnoDB
    Erdemed1defender_audit_log: Data: 0.02MB + Index: 0.08MB + Engine InnoDB
    Erdemed1defender_email_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    Erdemed1defender_lockout: Data: 2.30MB + Index: 0.66MB + Engine InnoDB
    Erdemed1defender_lockout_log: Data: 6.02MB + Index: 15.06MB + Engine InnoDB
    Erdemed1defender_scan: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    Erdemed1defender_scan_item: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    Erdemed1e_events: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    Erdemed1e_notes: Data: 0.02MB + Index: 0.17MB + Engine InnoDB
    Erdemed1e_notes_users_relations: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
    Erdemed1e_submissions: Data: 0.02MB + Index: 0.27MB + Engine InnoDB
    Erdemed1e_submissions_actions_log: Data: 0.02MB + Index: 0.11MB + Engine InnoDB
    Erdemed1e_submissions_values: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    Erdemed1fbv: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    Erdemed1fbv_attachment_folder: Data: 0.11MB + Index: 0.00MB + Engine InnoDB
    Erdemed1give_commentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    Erdemed1give_comments: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    Erdemed1give_donationmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    Erdemed1give_donormeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    Erdemed1give_donors: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    Erdemed1give_formmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    Erdemed1give_logmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    Erdemed1give_logs: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    Erdemed1give_sequential_ordering: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    Erdemed1give_sessions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    Erdemed1gla_budget_recommendations: Data: 0.22MB + Index: 0.14MB + Engine InnoDB
    Erdemed1gla_merchant_issues: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    Erdemed1gla_shipping_rates: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    Erdemed1gla_shipping_times: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    Erdemed1jet_cct_podcast: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    Erdemed1jet_cct_terminilogy: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    Erdemed1jet_fb_records: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    Erdemed1jet_fb_records_actions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    Erdemed1jet_fb_records_errors: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    Erdemed1jet_fb_records_fields: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    Erdemed1jet_post_types: Data: 0.20MB + Index: 0.00MB + Engine InnoDB
    Erdemed1jet_reviews: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    Erdemed1jet_review_comments: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    Erdemed1jet_review_guests: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    Erdemed1jet_review_meta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    Erdemed1jet_review_types: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    Erdemed1jet_search_suggestions: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    Erdemed1jet_smart_filters_indexer: Data: 0.30MB + Index: 0.00MB + Engine InnoDB
    Erdemed1jet_taxonomies: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    Erdemed1jet_widgets_styles: Data: 2.09MB + Index: 0.00MB + Engine InnoDB
    Erdemed1links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    Erdemed1mailchimp_carts: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    Erdemed1mailchimp_jobs: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    Erdemed1mclean_refs: Data: 0.08MB + Index: 0.00MB + Engine InnoDB
    Erdemed1mclean_scan: Data: 0.08MB + Index: 0.02MB + Engine InnoDB
    Erdemed1mlw_qm_audit_trail: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    Erdemed1mlw_questions: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    Erdemed1mlw_question_terms: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
    Erdemed1mlw_quizzes: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    Erdemed1mlw_quiz_theme_settings: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    Erdemed1mlw_results: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    Erdemed1mlw_themes: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    Erdemed1options: Data: 9.02MB + Index: 0.22MB + Engine InnoDB
    Erdemed1pms_member_subscriptionmeta: Data: 0.28MB + Index: 0.03MB + Engine InnoDB
    Erdemed1pms_member_subscriptions: Data: 0.05MB + Index: 0.03MB + Engine InnoDB
    Erdemed1pms_paymentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    Erdemed1pms_payments: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    Erdemed1postmeta: Data: 542.34MB + Index: 14.97MB + Engine InnoDB
    Erdemed1posts: Data: 234.23MB + Index: 1.38MB + Engine InnoDB
    Erdemed1post_views: Data: 13.52MB + Index: 15.89MB + Engine InnoDB
    Erdemed1rsvpmailer_blocked: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    Erdemed1rsvpmaker: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    Erdemed1rsvpmaker_event: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    Erdemed1rsvpmaker_money: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    Erdemed1rtec_registrations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    Erdemed1smush_dir_images: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    Erdemed1snippets: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    Erdemed1social_users: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    Erdemed1swpm_membership_meta_tbl: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    Erdemed1swpm_membership_tbl: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    Erdemed1swpm_members_tbl: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    Erdemed1swpm_payments_tbl: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    Erdemed1termmeta: Data: 0.25MB + Index: 0.03MB + Engine InnoDB
    Erdemed1terms: Data: 0.05MB + Index: 0.03MB + Engine InnoDB
    Erdemed1term_relationships: Data: 0.22MB + Index: 0.19MB + Engine InnoDB
    Erdemed1term_taxonomy: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    Erdemed1tm_taskmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    Erdemed1tm_tasks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    Erdemed1trp_gettext_mn: Data: 0.41MB + Index: 0.44MB + Engine InnoDB
    Erdemed1trp_original_meta: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
    Erdemed1trp_original_strings: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    Erdemed1um_metadata: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
    Erdemed1usermeta: Data: 4.52MB + Index: 3.84MB + Engine InnoDB
    Erdemed1users: Data: 0.27MB + Index: 0.23MB + Engine InnoDB
    Erdemed1user_registration_sessions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    Erdemed1wc_admin_notes: Data: 0.09MB + Index: 0.00MB + Engine InnoDB
    Erdemed1wc_admin_note_actions: Data: 0.06MB + Index: 0.02MB + Engine InnoDB
    Erdemed1wc_avatars_cache: Data: 0.02MB + Index: 0.09MB + Engine InnoDB
    Erdemed1wc_category_lookup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    Erdemed1wc_comments_subscription: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
    Erdemed1wc_customer_lookup: Data: 0.06MB + Index: 0.03MB + Engine InnoDB
    Erdemed1wc_download_log: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    Erdemed1wc_follow_users: Data: 0.02MB + Index: 0.13MB + Engine InnoDB
    Erdemed1wc_orders: Data: 0.02MB + Index: 0.11MB + Engine InnoDB
    Erdemed1wc_orders_meta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    Erdemed1wc_order_addresses: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
    Erdemed1wc_order_coupon_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    Erdemed1wc_order_operational_data: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    Erdemed1wc_order_product_lookup: Data: 0.11MB + Index: 0.06MB + Engine InnoDB
    Erdemed1wc_order_stats: Data: 0.08MB + Index: 0.05MB + Engine InnoDB
    Erdemed1wc_order_tax_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    Erdemed1wc_phrases: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    Erdemed1wc_product_attributes_lookup: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    Erdemed1wc_product_download_directories: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    Erdemed1wc_product_meta_lookup: Data: 0.02MB + Index: 0.09MB + Engine InnoDB
    Erdemed1wc_rate_limits: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    Erdemed1wc_reserved_stock: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    Erdemed1wc_tax_rate_classes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    Erdemed1wc_users_voted: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
    Erdemed1wc_webhooks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    Erdemed1wpfm_backup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    Erdemed1wpil_report_links: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
    Erdemed1wpmailsmtp_debug_events: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    Erdemed1wpmailsmtp_tasks_meta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    Erdemed1wpml_mails: Data: 6.52MB + Index: 0.00MB + Engine InnoDB
    Erdemed1wpr_rocket_cache: Data: 0.31MB + Index: 0.47MB + Engine InnoDB
    Erdemed1wpr_rucss_used_css: Data: 0.02MB + Index: 0.09MB + Engine InnoDB
    Erdemed1wt_iew_action_history: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    Erdemed1wt_iew_cron: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    Erdemed1wt_iew_ftp: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    Erdemed1wt_iew_mapping_template: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    Erdemed1yoast_indexable: Data: 2.34MB + Index: 0.92MB + Engine InnoDB
    Erdemed1yoast_indexable_hierarchy: Data: 0.19MB + Index: 0.25MB + Engine InnoDB
    Erdemed1yoast_migrations: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    Erdemed1yoast_primary_term: Data: 0.23MB + Index: 0.22MB + Engine InnoDB
    Erdemed1yoast_seo_links: Data: 0.14MB + Index: 0.09MB + Engine InnoDB
    Erdemed1yoast_seo_meta: Data: 0.16MB + Index: 0.00MB + Engine InnoDB
    
    ### Post Type Counts ###
    
    acf-field: 24
    ae_global_templates: 1
    attachment: 1148
    bibliothek: 1
    cartflows_flow: 1
    cartflows_step: 2
    casediscussion: 1
    clinic: 132
    custom_css: 1
    elementor_font: 1
    elementor_icons: 2
    elementor_library: 64
    elementor_snippet: 4
    elementor-hf: 1
    fca_qc_quiz: 1
    glossary: 1
    icd10: 2040
    is_search_form: 1
    jet-engine: 12
    jet-form-builder: 8
    jet-menu: 3
    jet-page-template: 1
    jet-popup: 1
    jet-smart-filters: 5
    language_switcher: 2
    library: 2
    my_keywords: 2
    nav_menu_item: 87
    oceanwp_library: 7
    oembed_cache: 16
    page: 28
    pharma: 163
    pharmadiscount: 615
    pms-subscription: 5
    post: 91
    preclinic: 8
    product: 3
    qsm_quiz: 1
    revision: 3799
    rsvpemail: 2
    shop_order: 512
    theory: 8
    tooltipy: 1
    tribe_events: 1
    um_directory: 1
    um_form: 3
    user_registration: 1
    wmpc-trash: 53
    wp_block: 1
    wp_global_styles: 1
    wpdiscuz_form: 1
    wpforms: 1
    
    ### Security ###
    
    Secure connection (HTTPS): ?
    Hide errors from visitors: ?
    
    ### Active Plugins (48) ###
    
    Autocomplete WooCommerce Orders: by QuadLayers – 3.1.2
    Code Snippets: by Code Snippets Pro – 3.4.2
    Defender: by WPMU DEV – 4.0.1
    Elementor Pro: by Elementor.com – 3.15.1
    Elementor: by Elementor.com – 3.15.2
    FileBird Pro: by Ninja Team – 5.5
    Site Kit by Google: by Google – 1.106.0
    JetBlocks For Elementor: by Crocoblock – 1.3.7
    JetBlog For Elementor: by Crocoblock – 2.3.4
    JetElements Dynamic Data Addon: by Zemez – 1.1.2
    JetElements For Elementor: by Crocoblock – 2.6.12.1
    JetEngine - Custom visibility conditions: by Crocoblock – 1.0.0
    JetEngine: by Crocoblock – 3.2.3.2
    JetMenu: by Crocoblock – 2.3.0
    JetPopup: by Crocoblock – 2.0.1
    JetReviews For Elementor: by Crocoblock – 2.3.1
    JetSearch: by Crocoblock – 3.1.1
    JetSmartFilters: by Crocoblock – 3.2.0
    JetStyleManager: by Crocoblock – 1.3.6
    JetTabs For Elementor: by Crocoblock – 2.1.23
    JetThemeCore: by Crocoblock – 2.1.1
    JetTricks: by Crocoblock – 1.4.4
    JetFormBuilder: by Crocoblock – 3.1.1
    JetWidgets For Elementor: by Crocoblock – 1.0.14
    Loco Translate: by Tim Whitlock – 2.6.4
    Paid Member Subscriptions: by Cozmoslabs – 2.9.9
    Post Views Counter: by Digital Factory – 1.3.13
    Quiz Cat Free: by Fatcat Apps – 3.0.3
    Really Simple SSL: by Really Simple Plugins – 7.0.8
    Shortcodes Ultimate: by Vova Anokhin – 5.13.2
    Simple Tooltips: by Justin Saad – 2.1.4
    Tawk.to Live Chat: by Tawkto – 0.8.0
    Advanced Editor Tools: by Automattic – 5.9.0
    UpdraftPlus - Backup/Restore: by UpdraftPlus.Com
    DavidAnderson – 1.23.8
    
    User Role Editor: by Vladimir Garagulya – 4.64
    WooCommerce Golomt Bank Payment Gateway: by B@KU[mN] – 1.0.0
    Gateway for Qpay on WooCommerce: by Unimedia Solutions LLC engineers – 1.0.0
    Checkout Field Editor for WooCommerce: by ThemeHigh – 1.9.0
    Force Authentification Before Checkout for WooCommerce: by Luiz Bills – 1.4.3
    Advanced Order Export For WooCommerce: by AlgolPlus – 3.4.2
    WooCommerce: by Automattic – 8.0.1
    Yoast SEO: by Team Yoast – 20.13
    WP Copy Protect: by Sazzad Areafin – 1.6
    WP Mail Logging: by WP Mail Logging Team – 1.12.0
    WP Mail SMTP: by WP Mail SMTP – 3.8.2
    WP Rocket | Clean Post Cache after WooCommerce Order: by WP Rocket Support Team –
    WP Rocket | Add custom htaccess rules to set no-store on HTML: by WP Rocket Support Team –
    WP Rocket: by WP Media – 3.14.3
    
    ### Inactive Plugins (0) ###
    
    
    ### Dropin Plugins (1) ###
    
    advanced-cache.php: advanced-cache.php
    
    ### Settings ###
    
    API Enabled: –
    Force SSL: –
    Currency: MNT (?)
    Currency Position: left_space
    Thousand Separator: ,
    Decimal Separator: .
    Number of Decimals: 0
    Taxonomies: Product Types: external (external)
    grouped (grouped)
    simple (simple)
    variable (variable)
    
    Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog)
    exclude-from-search (exclude-from-search)
    featured (featured)
    outofstock (outofstock)
    rated-1 (rated-1)
    rated-2 (rated-2)
    rated-3 (rated-3)
    rated-4 (rated-4)
    rated-5 (rated-5)
    
    Connected to WooCommerce.com: –
    Enforce Approved Product Download Directories: ?
    HPOS feature screen enabled: –
    HPOS feature enabled: –
    Order datastore: WC_Order_Data_Store_CPT
    HPOS data sync enabled: –
    
    ### WC Pages ###
    
    Shop base: ? Page ID is set
    but the page does not exist
    
    Cart: ? Page does not contain the [woocommerce_cart] shortcode or the woocommerce/cart block.
    Checkout: #25505 - /checkout/
    My account: #26179 - /my-account/
    Terms and conditions: #2305 - /privacy-policy/
    
    ### Theme ###
    
    Name: Hello Elementor
    Version: 2.8.1
    Author URL: https://elementor.com/?utm_source=wp-themes&utm_campaign=author-uri&utm_medium=wp-dash
    Child Theme: ? – If you are modifying WooCommerce on a parent theme that you did not build personally we recommend using a child theme. See: How to create a child theme
    WooCommerce Support: ? Not declared
    
    ### Templates ###
    
    Overrides: –
    
    ### Admin ###
    
    Enabled Features: activity-panels
    analytics
    product-block-editor
    coupons
    core-profiler
    customer-effort-score-tracks
    import-products-task
    experimental-fashion-sample-products
    shipping-smart-defaults
    shipping-setting-tour
    homescreen
    marketing
    mobile-app-banner
    navigation
    onboarding
    onboarding-tasks
    remote-inbox-notifications
    remote-free-extensions
    payment-gateway-suggestions
    shipping-label-banner
    subscriptions
    store-alerts
    transient-notices
    woo-mobile-welcome
    wc-pay-promotion
    wc-pay-welcome-page
    
    Disabled Features: minified-js
    new-product-management-experience
    product-variation-management
    settings
    async-product-editor-category-field
    
    Daily Cron: ? Next scheduled: 2023-08-12 12:07:29 +08:00
    Options: ?
    Notes: 109
    Onboarding: completed
    
    ### Action Scheduler ###
    
    Complete: 705
    Oldest: 2023-07-12 18:20:28 +0800
    Newest: 2023-08-12 03:44:25 +0800
    
    Failed: 6,831
    Oldest: 2022-11-09 04:52:26 +0800
    Newest: 2023-08-10 18:20:08 +0800
    
    Pending: 1,962
    Oldest: 2023-08-11 23:33:00 +0800
    Newest: 2023-08-12 20:39:47 +0800
    
    
    ### Status report information ###
    
    Generated at: 2023-08-12 03:44:31 +08:00
    `

    Thank you for your attention and support. I look forward to your guidance.

    Best regards,

    Budkhand

    • This topic was modified 1 year, 7 months ago by budkhand.
    • This topic was modified 1 year, 7 months ago by budkhand.

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support Shameem R. a11n

    (@shameemreza)

    Hi @budkhand

    I understand that you’ve already tried the recommended solution using the send_password_change_email filter and a custom code snippet, but unfortunately, these solutions did not work.

    Before we proceed with other troubleshooting steps, does the snippet shared on that gist resolve your issue?

    If that didn’t resolve, can you try to add this snippet to your child theme’s functions.php:

    add_action('woocommerce_checkout_update_user_meta', 'prevent_password_change_email', 10, 2);
    
    function prevent_password_change_email($customer_id, $data) {
    remove_action('profile_update', 'wp_send_new_user_notifications');
    wp_update_user(array('ID' => $customer_id, 'user_pass' => $data['password']));
    add_action('profile_update', 'wp_send_new_user_notifications');
    }

    Please try this and let us know if it helps.

    Thanks!

    Thread Starter budkhand

    (@budkhand)

    Hello,

    Both codes unfortunately do not work. Thank you for your attention and support. I look forward to your guidance.

    Best regards,

    Budkhand

    Hi there @budkhand

    I’d like to loop back to your original message, for a moment:

    Newly registered users on my website are receiving a “Password Changed” email after their first purchase. This behavior is unexpected and confusing for my customers. The “Password Changed” email is triggered simultaneously with the “Order Received” email only for new registered users, specifically on their first purchase.

    From what I gather, the undesired behavior is the Password Changed email being sent out simultaneously with the customer’s order. Correct?

    Can you please share a screenshot of what you see at the screen at WooCommerce > Settings > Account & privacy > Account creation? Additionally, one of the Password Changed email being sent out to new customers. Here’s how to make a screenshot:

    https://wordpress.com/support/make-a-screenshot/

    With an out-of-the box WooCommerce installation, and the When creating an account, send the new user a link to set their password option enabled in the settings screen mentioned above, an email titled Your My WooCommerce Site account has been created! is being sent out.

    Looking forward to your response, thank you.

    Thread Starter budkhand

    (@budkhand)

    Hi there @anastas10s

    Here is screenshot from account creation: https://prnt.sc/2HJicWmOjfkz

    Here is email from password changed email: https://prnt.sc/WQC-YX4B-lnd. In password changed email shows email from main admin. I find that frustrating. It’s probably from wordpress not woocommerce.

    Thank you for your attention and support. I look forward to your guidance.

    Best regards,

    Budkhand

    Hello again @budkhand ??

    Thank you for reaching back, with further information on this!

    email from password changed email: https://prnt.sc/WQC-YX4B-lnd. In password changed email shows email from main admin. I find that frustrating. It’s probably from wordpress not woocommerce.

    It appears to be sent out from WordPress, not WooCommerce, indeed.

    What do the logs from the WP Mail Logging plugin reveal about it?

    I trust that points you in the right direction, but if you have more questions, let us know.

    We’re happy to help.

    Thread Starter budkhand

    (@budkhand)

    Hello,

    I used WP Mail SMTP regular version.

    But i conducted tests with Elementor support and confirmed that the problem persists even with all other plugins deactivated and a new theme installed.

    The issue seems to be related to WooCommerce, as it occurs only when WooCommerce is active with a basic theme.

    Password changed email comes only once after the first purchase and if user buy again, it doesn’t come anymore. It’s really weird I don’t know what to do next.

    Thank you for your attention and support. I look forward to your guidance.

    Best regards,

    Budkhand

    Plugin Support Stuart Duff – a11n

    (@stuartduff)

    Automattic Happiness Engineer

    Hi @budkhand,

    The only setting, if enabled, within the free WooCommerce plugin that would send an email to change a password after a customer registers an account would be this setting below.

    Screenshot: https://cloudup.com/cecoNuLu2_5

    Deactivating that setting would prevent any password change emails from being sent to customers of a WooCommerce installation after they register an account.

    I’ve also performed some cross-testing for us today on several of my sites with the latest versions of WordPress, WooCommerce and our free Storefront theme as the only enabled software. When doing so, I’ve been unable to replicate the behaviour you describe after deactivating that setting within WooCommerce.

    From what you have described, it could be code from another plugin or theme which has caused a possible conflict and affected the functionality of WooCommerce.

    To see if that is the case we’d suggest carrying out a conflict test on your site by disabling all other plugins aside from WooCommerce along with switching to a theme like Storefront. This will help with trying to and locate what software you have installed which could possibly be causing this behaviour? You could use a free plugin called Health Check and Troubleshooting to carry out such testing.

    When in Troubleshooting mode all plugins will be deactivated and only the admin of the site carrying out the troubleshooting would see those changes. Any customers visiting the site would see no changes at all.

    Once you have disabled all other plugins and switched theme if the behaviour is resolved you can then enabled your theme and sites plugins testing after each one is enabled until the behaviour returns to locate the culprit.

    https://docs.woocommerce.com/document/how-to-test-for-conflicts/

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Issue with Password Change Email for New Registered Users’ is closed to new replies.