Hi,
I have the same problem but can you tell me which code because the lines you say are not the same at my code.
Check my code:
/**
* Initializes the class
*
* Checks for an existing instance
* and if it doesn’t find one, creates it.
*/
public static function init() {
static $instance = false;
if ( ! $instance ) {
$instance = new self();
}
return $instance;
}
/**
* Include required CSS and JS
*
* @return void
*/
public function admin_scripts() {
$crm_contact_forms_settings = [
‘nonce’ => wp_create_nonce( ‘erp_settings_contact_forms’ ),
‘plugins’ => array_keys( $this->active_plugin_list ),
‘forms’ => $this->forms,
‘mappedData’ => get_option( ‘wperp_crm_contact_forms’, ” ),
‘crmOptions’ => $this->crm_options,
‘scriptDebug’ => defined( ‘SCRIPT_DEBUG’ ) ? SCRIPT_DEBUG : false,
‘contactGroups’ => erp_crm_get_contact_groups_list(),
‘contactOwners’ => erp_crm_get_crm_user_dropdown(),
‘i18n’ => [
‘notMapped’ => __( ‘Not Set’, ‘erp’ ),
‘labelOK’ => __( ‘OK’, ‘erp’ ),
‘labelContactGroups’ => __( ‘Contact Group’, ‘erp’ ),
‘labelSelectGroup’ => __( ‘Select Contact Group’, ‘erp’ ),
‘labelContactOwner’ => __( ‘Contact Owner’, ‘erp’ ),
‘labelSelectOwner’ => __( ‘Select Owner’, ‘erp’ ),
],
];
wp_enqueue_style( ‘erp-sweetalert’ );
wp_enqueue_script( ‘erp-sweetalert’ );
wp_enqueue_script( ‘erp-vuejs’ );
wp_enqueue_script( ‘erp-settings-contact-forms’, WPERP_CRM_ASSETS . ‘/js/erp-settings-contact-forms.js’, [ ‘erp-vuejs’, ‘jquery’, ‘erp-sweetalert’ ], WPERP_VERSION, true );
wp_localize_script( ‘erp-settings-contact-forms’, ‘crmContactFormsSettings’, $crm_contact_forms_settings );
}
Please help me. Thanks