Mailchimp one-by-one sync instead of bulk

Home Forums User Registration Mailchimp one-by-one sync instead of bulk

This topic contains 1 reply, has 2 voices, and was last updated by  sanjeev3 11 months, 3 weeks ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #7004

    Tamás Takács
    Participant

    Hello!

    I just purchased this plugin with Mailchimp addon.
    All good so far, but one thing missing for my success:
    I want to force a sync after every user registration, so MailChimp can send out the DOI letter without delay.

    Is this possible by editing code, or setting up frequent cron job?

    #7006

    sanjeev3
    Member

    Yes. You can use the provided filter hook user_registration_after_register_user_action. Please add the following codes to your child theme’s functions.php.

    add_filter( 'user_registration_after_register_user_action', 'ur_force_synchronize', 10, 3 );
    
    function ur_force_synchronize( $form_data, $form_id, $user_id ) {
    
    	$urmc_mailchimp_settings_option = get_option( 'urmc_mailchimp_settings', array() );
    	URMC_MailChimp::validate_key_and_update( $urmc_mailchimp_settings_option, true );
    }

    Let me know if you have any further confusion.

    Regards,
    WPEverest Support

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.