Title: Subscribe programmatically
Last modified: May 20, 2021

---

# Subscribe programmatically

 *  Resolved [Zyggmunt](https://wordpress.org/support/users/zyggmunt/)
 * (@zyggmunt)
 * [5 years ago](https://wordpress.org/support/topic/subscribe-programmatically-2/)
 * Hi,
 * I use your form to subscribe to Mailchimp and works great. However, I’m making
   payment gateway and would like to also add checkbox: “Subscribe to the newsletter”.
 * Is it possible to run using PHP/JS a function that will send email to Mailchimp
   programmatically and in general will do everything like using your form?
 * I mean, I would just create my own input, get email and send using your plugin
   to the Mailchimp. Is it possible?
 * Maybe there is any handler (like do_action) I could run to do it?

Viewing 1 replies (of 1 total)

 *  [jpowersdev](https://wordpress.org/support/users/jpowersdev/)
 * (@jpowersdev)
 * [5 years ago](https://wordpress.org/support/topic/subscribe-programmatically-2/#post-14476246)
 * Hi [@zyggmunt](https://wordpress.org/support/users/zyggmunt/),
 * Though we do not directly expose an action for subscribing a user, we do have
   a handful of third-party integrations built out. For example, we [have one for WooCommerce](https://github.com/yikesinc/yikes-inc-easy-mailchimp-extender/blob/d0425eb4ba7def8921e019d2eea7bb7130ef17be/public/classes/checkbox-integrations/class.woocommerce_checkout_form-checkbox.php).
   I’m not sure if you are using WooCommerce to build your payment gateway, but 
   if not the code itself may be useful for building your own handler.
 * Let me know if that helps,
    Jon

Viewing 1 replies (of 1 total)

The topic ‘Subscribe programmatically’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/yikes-inc-easy-mailchimp-extender_a1c7e5.
   svg)
 * [Easy Forms for Mailchimp](https://wordpress.org/plugins/yikes-inc-easy-mailchimp-extender/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/yikes-inc-easy-mailchimp-extender/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/yikes-inc-easy-mailchimp-extender/)
 * [Active Topics](https://wordpress.org/support/plugin/yikes-inc-easy-mailchimp-extender/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/yikes-inc-easy-mailchimp-extender/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/yikes-inc-easy-mailchimp-extender/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [jpowersdev](https://wordpress.org/support/users/jpowersdev/)
 * Last activity: [5 years ago](https://wordpress.org/support/topic/subscribe-programmatically-2/#post-14476246)
 * Status: resolved