Skip Navigation

[Resolved] Non-Toolset User Field works in dev, but not in Production

This support ticket is created 2 years, 1 month ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 9 replies, has 3 voices.

Last updated by simonM-5 2 years ago.

Assisted by: Waqar.

Author
Posts
#2479041
Screenshot 2022-10-19 at 10.45.17.png
Screenshot 2022-10-19 at 10.42.05.png

Hi Support

We implememnted the actions described in our previous ticket: https://toolset.com/forums/topic/auto-subscribe-users-on-registration-to-mailchimp/ as follows. It's working fine in our dev environment but in our production environment it's not. I cannot see any difference in the setup.

1) Activated the non-toolset non-Toolset User Field "mailchimp_woocommerce_is_subscribed" on the Manage non-Toolset User Fields with Toolset Forms screen(see screenshot)

here in dev: hidden link
here in www: hidden link

2) Added the following code to:
- User Form - New Native Nanny User (ID: 1242)
- User Form - New Family User (ID: 1308)

<h6 class="hidden">[cred_field field='mailchimp_woocommerce_is_subscribed' force_type='field' class='form-control' output='bootstrap' value='1']</h6>

3) Created new users using the forms:
dev Nanny: hidden link (working fine)
www Nanny: hidden link (not working)

dev Family: hidden link (working fine)
www Family: hidden link (not working)

4) Checked each newly created User under WordPress Admin > Users > click a User > scroll to bottom > Mailchimp > observe setting of "User Subscribed" field

(Side note: There is no search feature here unfortunately - would be nice to be able to search here - and the Screen Options is ignoring any changes made to the number of items to show on the page - see screenshot. This happens for all our Screen Options on the Toolset screens! Is this a known issue? Should I open a new ticket regarding this if there is no known workaround?)

Could you please help us understand why it is not working in our production site?

Thanks and regards
Simon

#2479061

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Can you please share admin access details for your Dev site and let me check how you setup things there.

I have set the next reply to private which means only you and I have access to it.

#2479063
#2479211

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

This is really strange and I suspect that there must be conflicting here.

When I try to create a profile form me and when I checked the usermeta table and I found that usermeta key "mailchimp_woocommerce_is_subscribed" is set to 0. I changed the value to 1 and updated that usermeta row but still when I visit the user profile page in backend I still the the checkbox "User Subscribed" is not still active even though I set the meta value to 1 for the meta key "mailchimp_woocommerce_is_subscribed".

Then I tried different approach, I even tried by adding the hook to the code snippet "auto-login-after-cred-user-creation":
=> hidden link
- The following code is currently commented.

add_action('cred_save_data', 'func_set_mailchimp_checkbox',10,2);
function func_set_mailchimp_checkbox($user_id, $form_data) {
    if ($form_data["id"]==1242) {
               update_user_meta($user_id,'mailchimp_woocommerce_is_subscribed',1);
    }
}

When I tried with above code I can see that the user meta key "mailchimp_woocommerce_is_subscribed" is added to the usermeta table with meta value 1. Then I visit the user profile again but still I can see even though the usermeta value is set to 1 for the user meta key "mailchimp_woocommerce_is_subscribed", still the "User Subscribed" is shown unchecked.

There must be conflicting something here. You will have to check by deactivating plugins or theme or is there any dependency to to make that checkbox "User Subscribed" checked that you will have to check with plugin author.

#2482433

HI Minesh

Thanks for your insights. I need a bit more time to investigate this. I'll get back to you asap.

Best regards
Simon

#2482883

Hi Simon,

Minesh is on vacation, so I'll be following up on this ticket.

Sure, please take your time and let us know if you need any further assistance with this.

For a new question or concern, you're welcome to start a new ticket.

regards,
Waqar

#2485619

Hi Waqar

I have contacted MailChimp support for advice, awaiting their reply. I will update as soon as I hear from them.

Thanks and have a nice weekend!
Simon

#2486761

Thanks for the update Simon and will wait to hear back from you.

#2491333

HI Waqar

We received an update from Mailchimp support, but I need to discuss its legal ramifications with my colleague. I will update you on Wednesday if we need further technical assistance here.

Kind regards
Simon

#2491781

Thanks for keeping us updated and the ticket will stay open.

#2495935

Hi Waqar

We have decided not to go for an automated solution, based on feedback from Mailchimp support, so I think we can close this ticket now.

Thanks for all your effort so far nevertheless!

My issue is resolved now. Thank you!