it’s loading all the super-efficient library.min.js Versions but you need to debug a JavaScript file?
open wp-config.php in your favourite editor an add: (right after define(‘WP_DEBUG’, true);)
[cc lang=”php” escaped=”true” width=”600″]
/**
* For developers: WordPress debugging mode.
*
* Change this to true to enable the display of notices during development.
* It is strongly recommended that plugin and theme developers use WP_DEBUG
* in their development environments.
*/
define(‘WP_DEBUG’, true);
define(‘SCRIPT_DEBUG’, true); // Add define(‘SCRIPT_DEBUG’, true); to wp-config.php to enable loading of non-minified,
[/cc]
in theory this should have some effect on functions like:
http://wordpress.org/wp-content/plugins/woocommerce/includes/class-wc-frontend-scripts.php
that are responsible for embedding the *.js woocommerce javascript libraries:
[cc lang=”php” escaped=”true” width=”600″]
/**
* Register/queue frontend scripts.
*/
public static function load_scripts() {
global $post;
$suffix = defined( ‘SCRIPT_DEBUG’ ) && SCRIPT_DEBUG ? ” : ‘.min’;
$lightbox_en = ‘yes’ === get_option( ‘woocommerce_enable_lightbox’ );
$ajax_cart_en = ‘yes’ === get_option( ‘woocommerce_enable_ajax_add_to_cart’ );
$assets_path = str_replace( array( ‘http:’, ‘https:’ ), ”, WC()->plugin_url() ) . ‘/assets/’;
$frontend_script_path = $assets_path . ‘js/frontend/’;
// Chosen is @deprecated as of 2.3 in favour of 2.3. Here for backwards compatibility.
self::register_script( ‘chosen’, $assets_path . ‘js/chosen/chosen.jquery’ . $suffix . ‘.js’, array( ‘jquery’ ), ‘1.0.0’ );
self::register_script( ‘select2’, $assets_path . ‘js/select2/select2’ . $suffix . ‘.js’, array( ‘jquery’ ), ‘3.5.2’ );
// Register any scripts for later use, or used as dependencies
self::register_script( ‘jquery-blockui’, $assets_path . ‘js/jquery-blockui/jquery.blockUI’ . $suffix . ‘.js’, array( ‘jquery’ ), ‘2.70’ );
self::register_script( ‘jquery-payment’, $assets_path . ‘js/jquery-payment/jquery.payment’ . $suffix . ‘.js’, array( ‘jquery’ ), ‘1.2.4’ );
self::register_script( ‘jquery-cookie’, $assets_path . ‘js/jquery-cookie/jquery.cookie’ . $suffix . ‘.js’, array( ‘jquery’ ), ‘1.4.1’ );
self::register_script( ‘wc-credit-card-form’, $frontend_script_path . ‘credit-card-form’ . $suffix . ‘.js’, array( ‘jquery’, ‘jquery-payment’ ) );
self::register_script( ‘wc-add-to-cart-variation’, $frontend_script_path . ‘add-to-cart-variation’ . $suffix . ‘.js’ );
self::register_script( ‘wc-single-product’, $frontend_script_path . ‘single-product’ . $suffix . ‘.js’ );
self::register_script( ‘wc-country-select’, $frontend_script_path . ‘country-select’ . $suffix . ‘.js’ );
self::register_script( ‘wc-address-i18n’, $frontend_script_path . ‘address-i18n’ . $suffix . ‘.js’ );
// Register frontend scripts conditionally
if ( $ajax_cart_en ) {
self::enqueue_script( ‘wc-add-to-cart’, $frontend_script_path . ‘add-to-cart’ . $suffix . ‘.js’ );
…
[/cc]
this way i was able to debug that:
https://wordpress.org/wp-content/plugins/woocommerce/assets/js/frontend/checkout.js -> validate_field: function() {
is handling registration form input validation.
but if you have Plugin-Germanized installed: this one probably as well:
https://wordpress.org/wp-content/plugins/woocommerce-germanized/assets/js/revocation.min.js
liked this article?
- only together we can create a truly free world
- plz support dwaves to keep it up & running!
- (yes the info on the internet is (mostly) free but beer is still not free (still have to work on that))
- really really hate advertisement
- contribute: whenever a solution was found, blog about it for others to find!
- talk about, recommend & link to this blog and articles
- thanks to all who contribute!