ViaEth / PayViaEth

Non-Custodial Woocommerce Ethereum Payment Plugin
3 stars 1 forks source link

Including Libraries Already In Core #15

Open ViaEth opened 3 years ago

ViaEth commented 3 years ago

Your plugin has included a copy of a library that WordPress already includes.

WordPress includes a number of useful libraries, such as jQuery, Atom Lib, SimplePie, PHPMailer, PHPass, and more. For security and stability reasons, plugins may not include those libraries in their own code, but instead must use the versions of those libraries packaged with WordPress.

You can see the list of jQuery Libraries here:

https://developer.wordpress.org/reference/functions/wp_enqueue_script/#default-scripts-and-js-libraries-included-and-registered-by-wordpress

While we do not YET have a decent public facing page to list all these libraries, we do have a list here:

https://meta.trac.wordpress.org/browser/sites/trunk/api.wordpress.org/public_html/core/credits/wp-56.php#L723

It’s fine to locally include add-ons not in core, but please ONLY add those additional files. For example, you do not need the entire jquery UI library for one file. If your code doesn't work with the built-in versions of jQuery, it's most likely a noConflict issue.

Example(s) from your plugin:

PayViaEth-master/assets/lib/jquery.3.2.1.min.js

ViaEth commented 3 years ago

Removed the extra jquery package still need to test which sections of the code this effects if any.

ViaEth commented 3 years ago

After removing this version of jquery orders stopped being received I'll need to find and replace every instance used in the code. Will need to revert and test to check exactly what's going on.