Skip to content
This repository has been archived by the owner on Sep 16, 2019. It is now read-only.

Installing Woocommerce plugin knocks out Foundation js #53

Closed
mlcstudio opened this issue May 27, 2014 · 4 comments
Closed

Installing Woocommerce plugin knocks out Foundation js #53

mlcstudio opened this issue May 27, 2014 · 4 comments

Comments

@mlcstudio
Copy link

Hi,

It seems there is a conflict with this theme and woocommerce.

After installing the Woocommerce plugin, the console reports a type error on line 3 of app.js:

undefined is not a function

I have had a look inside the enqueue scripts file that you created with this plugin and it looks like everything is done by the book, but this error still appears. I have also tried including the app.js in the header rather than the footer and I have also tried using the bundled version of jQuery included with Wordpress and that still doesn't solve the conflict.

Any ideas on how to solve this issue with your theme?

Many thanks

@olefredrik
Copy link
Owner

Hi,
Please see this related issue (#40) for more info and proposed solution to the problem.

@mlcstudio
Copy link
Author

Hi Ole,

Thanks for that, but I would prefer not to disable the scripts enqueued by Woocommerce.

What I did to get around the problem is to modify the init-foundation.js file to this:

jQuery(document).ready(function($) {
$(document).foundation();
});

Now everything is working without removing any calls to jQuery.

Many thanks again for this theme, it’s great to work with!

@olefredrik
Copy link
Owner

Awesome! That seems like an even better solution 👍

@tsmith0511
Copy link

I'd rather not disable the scripts enqueued by Woocmmerce either and have tried:

jQuery(document).ready(function($) {
$(document).foundation();
});

but am still getting an error "Uncaught TypeError: undefined is not a function" on app.js. Any other ideas?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants