• Resolved LukasFritzeDev

    (@lkf_tanzt)


    Is there an easy way to add a subscriber from within another plugin.

    I have a custom shop plugin. In my REST-Endpoint I wan’t to check if the user has checked the newsletter checkbox and if so hand over the mail address to the newsletter plugin.

    By inspecting the code the only option I see at the moment is copy the stuff done in process_request() and do all this on my own. But this would be quite difficult since there are a lot of accesses made to instance properties and $form_data which comes from $_POST.

    I think of a function call like this:

    ES_XX_Contacts:add_subscriber( $dataArray, $listsArray );

    The $dataArray could contain email, name and status. I can compose this on my own. The function would do everything else, like setting defaults for not explicitly given values, storing stuff to database, sending double opt in mail depending on status, …

Viewing 1 replies (of 1 total)
  • Malay Ladu

    (@malayladu)

    Hi,

    We are working on this part and will provide a decent way to do this.

    We will update you once it’s implemented.

Viewing 1 replies (of 1 total)

The topic ‘Add subscriber from other plugin’ is closed to new replies.