Title: Dreadful code base. Developers beware.
Last modified: September 2, 2016

---

# Dreadful code base. Developers beware.

 *  [Dutch van Andel](https://wordpress.org/support/users/veraxus/)
 * (@veraxus)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/dreadful-code-base/)
 * I’ve been using WP e-Commerce for a couple of years… at first, because it was
   the only solution that integrated with WordPress in any meaningful and easy-to-
   use way.
 * Unfortunately, this plugin is a developer’s worst nightmare. Unbelievable amounts
   of presentational HTML hard-coded into core that should have been made customizable
   via template files; that’s right… if you want to modify basic features like “
   Customers Also Purchased” templates… you have modify WP eCommerce’s CORE. Have
   fun upgrading that in the future. Unfortunately, that’s a common theme here –
   almost every part of this plugin is programmed in the most haphazard, poorly 
   considered way imaginable.
 * Also, the way the plugin handles digital downloads is a disaster. Let me explain…
 * Adding digital products is pretty straightforward initially… you add files by
   uploading them to a specific folder on the server, then, when you attach the 
   files to a particular product, a new post is created in a hidden custom post 
   type.
 * By itself, that’s no issue… but this is where things start to really suck… every
   time you add a file to a product, even the same file over multiple products, 
   a new post is created with a reference to the file on the server, leaving you
   with multiple file reference entries in the database. And more bizzarely, the
   post title is used for the file path while post content is not used – so you 
   can’t give files meaningful names nor can you manage your files in any reasonable
   manner other than by hand using a MySQL editor. So… you now have multiple posts
   referencing the same file… and those file-posts are linked to products using 
   post_parent. Got it? Ok, brace yourself, this is where it gets messy…
 * If a customer buys a product that contains attached files, a guid is generated
   for each download link and a database record saved with a reference to the aforementioned
   non-public file-post in the database to obfuscate the files… BUT… if you ever
   remove a file from a product (i.e. you click the red X in the Edit Product screen),
   even accidentally, it **_permanently_** breaks every link for every existing 
   purchase (of that file) in the database.
 * If you add a new file to the product, WP eCommerce will _not_ generate new links
   for existing customers… nor does it even provide an UI/tool for it… because in
   the database, download links and purchases/carts are entirely independent and
   unrelated. Oh, and WP e-Commerce doesn’t allow you create manual orders from 
   the back-end if something gets screwed up (which is all too likely considering
   the mess that is the code base). Sure, there’s a $50 add-on you can buy, but 
   it’s broken too, and requires substantial developer hacking to get working.
 * Do yourself a favor and avoid this disastrous software at all costs. Check out
   WooCommerce instead. While it’s not perfect either (trust me, no e-commerce software
   is – and I have developed for _all of them_), it is much more admin-friendly,
   developer-friendly, server resource friendly, and FAR more well thought-out.

Viewing 1 replies (of 1 total)

 *  Moderator [Pippin Williamson](https://wordpress.org/support/users/mordauk/)
 * (@mordauk)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/dreadful-code-base/#post-7752388)
 * There are some major problems with the plugin, absolutely, but (as an unaffiliated
   developer) do keep in mind that this is the oldest WP ecommerce plugin out there.
   It is the original and for that, it has had (in the past) to do things in some
   very, very unconventional manners in order to make things work.
 * The code base is huge and it is being completely rewritten, but it takes a really,
   really long time.
 * Aside from legacy code, there are a lot of areas that were originally done really
   poorly, I’ll never deny that.
 * While I’m not affiliated officially, I have personally volunteered quite a few
   hours to help rewrite large portions of the plugins (just finished redoing the
   coupons UI) to bring them up to par and back in line with development standards.
 * Am I condoning the bad code in the plugin? No, not at all. I’m simply saying 
   that things are rapidly turning around. If you’d like proof of how quickly development
   is happening, checkout the github logs: [https://github.com/wp-e-commerce/WP-e-Commerce](https://github.com/wp-e-commerce/WP-e-Commerce)
 * I simply think that as developers (which you labeled yourself as) it is better
   for us to help contribute to projects and make them better than simply rating
   them poorly without at least raising the issues with the development team.

Viewing 1 replies (of 1 total)

The topic ‘Dreadful code base. Developers beware.’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-e-commerce_ebebeb.svg)
 * [WP eCommerce](https://wordpress.org/plugins/wp-e-commerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-e-commerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-e-commerce/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-e-commerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-e-commerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-e-commerce/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Pippin Williamson](https://wordpress.org/support/users/mordauk/)
 * Last activity: [13 years, 2 months ago](https://wordpress.org/support/topic/dreadful-code-base/#post-7752388)