Noptin_Page::pre_confirm_subscription( $page )

Confirms a user’s subscription to the newsletter.


Return Return

(array)


Top ↑

Source Source

File: includes/class-noptin-page.php

	public function pre_confirm_subscription( $page ) {
		$value = $this->get_request_value();

		if ( empty( $value ) ) {
			return;
		}

		// Fetch the subscriber.
		$subscriber = Noptin_Subscriber::get_data_by( 'confirm_key', $value );

		// And de-activate them.
		confirm_noptin_subscriber_email( $subscriber );

		// If we are redirecting by page id, fetch the page's permalink.
		if ( is_numeric( $page ) ) {
			$page = get_permalink( $page );
		}

		// If we have a redirect, redirect.
		if ( ! empty( $page ) ) {
			wp_redirect( $page );
			exit;
		}

	}


Top ↑

Changelog Changelog

Changelog
VersionDescription
1.2.7Introduced.

Top ↑

User Contributed Notes User Contributed Notes

30 day money back guarantee
Safe & Secure online payment
Custom CSS Slide Example
Custom Animation Example
Default Animation