Theme and Plugin Developers, Listen Up!!

We’ve made quite a few changes to WPeC over the past several releases. We’ve introduced a TON of great API and cleaned up quite a bit since 3.8.9 was released last October

We’ll be starting an educational series on developer-related changes and APIs that are available to you.  But in the meantime, I do want to make sure you’re aware of some really important changes in the latest 3.8.11 release.

The version of jQuery shipping with WordPress (3.4 and greater) deprecates the usage of .live(), .bind() and .delegate() in favor of .on().  We’ve exerted a lot of effort in the 3.8.11 release cycle to bring our Javascript up to date with this practice.  We also had some internal dependencies on a jQuery plugin called .livequery().  We’ve eliminated nearly every dependency on that in favor of .on() as well.  The 3.8.12 release will likely see the .livequery() plugin removed from WPeC core.

If your plugin or theme depends on (or includes) an old version of  jQuery, uses these deprecated methods, or depends on .livequery() – stuff is going to break.  Update your plugins/themes. 

We’ve also eliminated the dangerous practice of using eval() in Javascript.  We were able to eliminate all but one instance, but that instance will eventually be removed.

If your theme or plugins hooks in to the ‘wpsc_alternate_cart_html’ action to execute Javascript – this is now a bad practice.  Please stop.  We now have a custom JS event called ‘wpsc_fancy_notification’ you can hook into instead.

Lastly, we’ve made the change in our Javascript to stop using ‘index.php’ as an AJAX handler and have refactored everything to use the proper WordPress AJAX handler.  You can (and should) do the same.  If you’re unsure of how to properly develop AJAX functionality in core, the Codex has some great resources.  Also, you can look at how we’re doing it now.

This post is intended to help our developer community along the path that we’re going down – a path moving towards cleaner code, more excellent standards and greater adherence to WordPress core conventions. Everything mentioned is something that we’ve dealt with in support since releasing 3.8.11 and will serve your communities and ours very well.  If you have any questions, feel free to post in the comments and we’ll be glad to respond.

Cheers!

11 responses... add one

Error repport:
WP versjon 3.5.1–nb_NO
Twenty ten Versjon 1.5
WPEc Versjon 3.8.11.1

If WP settings -> General -> WordPress Address (URL) is different to Site Address (URL)
Then Add to chart will not work.

Setting same adress on bouth places fixed the problem.
Please advice how to fix it permanently, at it is not desired to display main store adress.

Hi Bergum,

Can you provide a URL that we can see the issue at?

My installation site is at
http://cbdesign.no/
But by shops site is at
http://herligverden.no/

I had it set up as in my previous post, but then i coud not add items to the chart.
I have changed it so that the whole shop now points at cbdesign, and then it works.
If you want me to set it back, give me a date and time to do it. (And time zone)

One more, and more severe.
When i add items to my chart, and choose go to checkout, it emptyes my chart….

Your Tax method is broken, ‘wpsc_taxes_total’ is submitted as 0.00 for all the rows. I am not the only one having this problem…

Your Tax method is broken, ‘wpsc_taxes_total’ is submitted as 0.00 for all the rows. I am not the only one having this problem… also

This is a good article & good site. It is help us following categorize:
Delivering high-quality service for your business applications,
Solutions for all Industries,
Getting your applications talking is the key to better business processes,
Rapid web services solutions for real business problems,
Understanding Your Data is the Key to Good Decision-Making,
Web-based Corporate Document Management System,
Outsourcing Solution,
Financial and Operations Business Intelligence Solution,

Hi, I wonder if it is possible to add a function for shopping cart and check out where each item is selected as ‘available by weight’ (with an option in settings for shop allowing to select lbs or kilograms) BUT please with the possible for decimal amounts, i.e. 2.5 kg etc. This has driving me bonkers for a long time. Preferably also able to adjustable by customer in check out (gold cart?) before final check out. Thanks! Martin
PS or a link to where this is explained on how to do would already be fine also….

I’m noticing a problem with the variations. How can I submit a trouble ticket? It doesn’t seem to be properly saving the variation images.

No you ruined it apparently. The last update I did has now gotten rid of my 2checkout payment option… Which is the only merchant I use..SO thanks.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.