• Resolved n381

    (@n381)


    Hello, i’ve tried features of Noptin plugin and found it versatile, thank you authors for making it available to WP users&members.

    While Noptin provides a configurable option for setting an unsubscribe and resubscribe redirections, i’ve a need in a custom website setup, to have externally accessible unsubscribe url, out of scope of Noptin emails – where it outputs urls via unsubscribe_url function’ shortcode together with appended token. I intend to provide email recipients with an unsubscribe link in a custom email template.

    Can you advice, please, how to replicate that unsubscribe_url with token? Is this function used for the unsubscribing url? get_noptin_action_url( 'unsubscribe', $key );

    Also would appreciate any information on shortcode confirmation_url and $subscriber->is_active() , as those specifics are not mentioned in the official documentation.

    Thank you, regards

    • This topic was modified 2 years, 5 months ago by n381.
    • This topic was modified 2 years, 5 months ago by n381.
Viewing 1 replies (of 1 total)
  • Plugin Author Noptin Newsletter Team

    (@picocodes)

    Hi @n381,

    Call use the following code to generate an unsubscribe URL for a given email address:-

    get_noptin_action_url( 'unsubscribe', noptin_encrypt( wp_json_encode( array( 'email' => '[email protected]' ) ) ) )

    Alternatively, you can create a normal page on your site and then add an unsubscribe form as shown here:- https://noptin.com/guide/subscription-forms/unsubscribe-forms/.

    You can use the following code to generate a subscription confirmation URL:-

    get_noptin_action_url( 'confirm', noptin_encrypt( wp_json_encode( array( 'email' => '[email protected]' ) ) ) )

    Finally, the $subscriber->is_active() function checks if a subscriber exists on your site and can receive emails (i.e their status is marked as subscribed).

Viewing 1 replies (of 1 total)

The topic ‘Question regarding unsubscribe_url’ is closed to new replies.