• Resolved andreuerj

    (@andreuerj)


    Hi, after uploading the plugin and activating it, the following warning message was displayed:

    Warning : Missing argument 2 for wp_register_script(), called in /home/storage/1/1/1/v4/public_html/v4/wp-content/plugins/wp-whatsapp-chat/whatsapp-chat.php on line 143 and defined in /home/storage/1/1/1/vr/public_html/vr/wp-includes/functions.wp-scripts.php on line 145

Viewing 4 replies - 1 through 4 (of 4 total)
  • There’s no argument 2 in this function.
    Please update plugin and clear your cache.

    Thread Starter andreuerj

    (@andreuerj)

    It’s the first time I install the plugin and I’m using the latest version.

    Thread Starter andreuerj

    (@andreuerj)

    I checked that is really missing a parameter. Please, refer to “whatsapp-chat.php” and “functions.wp-scripts.php”.

    whatsapp-chat.php
    On line 132:
    wp_register_script( ‘whatsapp-chat-index’, ”, true );

    On line 143:
    wp_register_script(‘whatsapp-chat-admin-js’);


    functions.wp-scripts.php

    * @param string $handle Name of the script. Should be unique.
    * @param string $src Full URL of the script, or path of the script relative to the WordPress root directory.
    * @param array $deps Optional. An array of registered script handles this script depends on. Default empty array.

    function wp_register_script( $handle, $src, $deps = array(), $ver = false, $in_footer = false )

    • This reply was modified 7 years, 5 months ago by andreuerj.
    Thread Starter andreuerj

    (@andreuerj)

    I changed the code above and the warning message stopped appearing:

    whatsapp-chat.php (On line 143)

    From: wp_register_script(‘whatsapp-chat-admin-js’);
    To: wp_register_script(‘whatsapp-chat-admin-js,’’);

    Please, double check and see what fits best.

    Regards,

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Warning message when activating the wp-whatsapp-chat’ is closed to new replies.