Support » Plugin: KP Fastest Tidio Chat » Use of undefined constant KPFTC_PLUGIN_SLUG

  • Resolved alx359

    (@alx359)


    Getting the debug.log steadily filled with these:

    PHP Warning: Use of undefined constant KPFTC_PLUGIN_SLUG - assumed 'KPFTC_PLUGIN_SLUG' (this will throw an Error in a future version of PHP) in /wp-content/plugins/kp-fastest-tidio-chat/includes/kpftc-shortcuts.php on line 39

    Please advise.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Kreativo Pro

    (@kreativopro)

    Hi @alx359

    We’ll fix this issue in the next version. For now, please replace KPFTC_PLUGIN_SLUG with ‘settings_page_kpftc’ value.

    Thanks,
    Kreativo Pro

    Thread Starter alx359

    (@alx359)

    Not sure what value is that?

    \plugins\kp-fastest-tidio-chat\includes\admin\kpftc-scripts-enqueue.php ~ line 9

    // Load CSS & JS on Plugin Setting Page
    function kpftc_admin_scripts( $hook )
    {	
    	// Define KPFTC_PLUGIN_SLUG as a PHP Constant
    	define ( 'KPFTC_PLUGIN_SLUG', $hook );
    //...
    }
    add_action( 'admin_enqueue_scripts', 'kpftc_admin_scripts' );
    

    It seems in define ( 'KPFTC_PLUGIN_SLUG', $hook ), $hook is getting a varying/invalid value in some situations.

    Plugin Author Kreativo Pro

    (@kreativopro)

    Hi @alx359

    Yes, in our testing KPFTC_PLUGIN_SLUG constant got defined and thus it could be re-used. But as you pointed, in some situations, it’s getting invalid value. We’ll do more testing and fix it in next version.

    Thanks,
    Kreativo Pro

    Plugin Author Kreativo Pro

    (@kreativopro)

    Please let us know.

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.