Noptin_Integrations::__construct()

Class Constructor.


Source Source

File: includes/integrations/class-noptin-integrations.php

	public function __construct() {

		// Load integrations.
		$integrations = array(
			'nf_init'            => 'load_ninja_forms_integration',
			'wpforms_loaded'     => 'load_wpforms_integration',
			'wpcf7_init'         => 'load_contact_form_7_integration',
			'elementor_pro/init' => 'load_elementor_forms_integration',
			'gform_loaded'       => 'load_gravity_forms_integration',
		);

		foreach ( $integrations as $action => $method ) {

			add_action( $action, array( $this, $method ) );
			if ( did_action( $action ) ) {
				call_user_func( array( $this, $method ) );
			}

		}

		// WooCommerce integration.
		if ( class_exists( 'WooCommerce' ) ) {
			$this->integrations['woocommerce'] = new Noptin_WooCommerce();
		}

		// EDD integration.
		if ( class_exists( 'Easy_Digital_Downloads' ) ) {
			$this->integrations['edd'] = new Noptin_EDD();
		}

		// WP Registration form integration.
		$this->integrations['wp_registration_form'] = new Noptin_WP_Registration_Form();

		// WP Comment form integration.
		$this->integrations['wp_comment_form'] = new Noptin_WP_Comment_Form();

		do_action( 'noptin_integrations_load', $this );

	}

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