WordPress soft reject - need help

Hello,
I got first soft reject as

Don’t include libraries that are already pre-packaged with WordPress. Reference: https://developer.wordpress.org/reference/functions/wp_enqueue_script/#defaults

Example(s): https://envato.d.pr/6AY44U

So I deleted the jQuery.min.js file and removed from functions.php but then my theme is not working properly. So I renamed it to custom-jquery.min.js then after uploaded. Another soft reject

Avoid using custom jQuery: https://envato.d.pr/xNwDgA

jQuery can be called for those scripts which need it passing the argument array(‘jquery’).

What to do now ? Please help

1 Like

Any Help Would Be Appreciated

My opinion try with this jquery.js

It’s because of the coding issue. You will need to rewrite the jQuery codes to make it work once again without loading the min.js file

Reviewer already give you the answer
WordPress already have jQuery, you must use this jQuery instead registering and enqueue custom jQuery

wp_enqueue_script( $handle, $src,  $deps, $ver, $in_footer ); 

$deps = (array) An array of registered script handles this script depends on.
To call the WP jQuery, you just need to add jquery into the array of $deps argument

wp_enqueue_script( 'name/id of your script', 'your_js_file.js',  array('jquery'), 'your_js_version', true ); 

more info https://developer.wordpress.org/reference/functions/wp_enqueue_script/

Good luck!

3 Likes