Automator_Load::wpforms_integration()


Source

File: src/class-automator-load.php

	public function wpforms_integration() {
		if ( ! class_exists( 'WPForms' ) ) {
			return;
		}
		if ( version_compare( WPFORMS_VERSION, '1.7.0', '<' ) ) {
			return;
		}
		add_filter(
			'wpforms_load_providers',
			function ( $providers ) {
				$providers[] = 'uncanny-automator';

				return $providers;
			},
			99,
			1
		);

		add_action(
			'wpforms_load_uncanny-automator_provider',
			function () {
				require_once UA_ABSPATH . 'src/core/admin/class-wpforms-provider.php';
			},
			99
		);
	}