Skip to content
Snippets Groups Projects
Commit 1a35996d authored by Pau Pulido's avatar Pau Pulido
Browse files

Merge branch 'fix/conditional-imports' into 'main'

Update file index.php with conditional imports

See merge request coopdevs/website/wp/wp-plugins/wpct-crm-forms!8
parents ada23b2a 5df7b59d
No related branches found
No related tags found
No related merge requests found
......@@ -4,14 +4,14 @@ if (!defined('ABSPATH')) {
exit;
}
require_once 'Addon.php';
require_once 'Field.php';
define('WPCT_CRM_FORMS_IBAN_FIELD', '1.0');
add_action('gform_loaded', 'wpct_crm_forms_load_iban_field', 5);
function wpct_crm_forms_load_iban_field()
{
if (!method_exists('GFForms', 'include_addon_framework')) return;
require_once 'Addon.php';
require_once 'Field.php';
GFAddOn::register(\WPCT_CRM_FORMS\IBAN_Field\Addon::class);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment