Title: WordPress 4.4 Problems With Plugin
Last modified: August 30, 2016

---

# WordPress 4.4 Problems With Plugin

 *  Resolved [Andrew1977](https://wordpress.org/support/users/andrew1977/)
 * (@andrew1977)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/wordpress-44-problems-with-plugin/)
 * I’ve updated to WordPress 4.4 today and this appears to have broken the checkout.
 * Basically none of the product information gets carried across to any of the payment
   methods we have in place.
 * In PayPal a “your basket is empty” error message is showing.
 * Has anyone else using this plugin had any issues after updating to WordPress 
   4.4 or have any ideas what might be causing this error?
 * Kind Regards,
 * Andrew
 * [https://wordpress.org/plugins/wp-e-commerce/](https://wordpress.org/plugins/wp-e-commerce/)

Viewing 15 replies - 1 through 15 (of 45 total)

1 [2](https://wordpress.org/support/topic/wordpress-44-problems-with-plugin/page/2/?output_format=md)
[3](https://wordpress.org/support/topic/wordpress-44-problems-with-plugin/page/3/?output_format=md)
[→](https://wordpress.org/support/topic/wordpress-44-problems-with-plugin/page/2/?output_format=md)

 *  [whitelamp](https://wordpress.org/support/users/whitelamp/)
 * (@whitelamp)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/wordpress-44-problems-with-plugin/#post-6837146)
 * Hi Mihai,
 * I work with Andrew on his site and fixed this last night (UTC). It should be 
   stressed that we are still running ver 3.9.4 of wp-e-c although I am in the process
   of upgrading to 3.11.
 * The problem was fixed by adding in cart-item.class.php, line 511 :
    if ($this-
   >custom_message == null) $this->custom_message = ”;
 * I found that custom_message was null and the subsequent insert was failing because
   of it.
 * I do have to wonder why the return value from $wpdb->insert() is not being checked
   and acted upon.
 *  [sarjn15](https://wordpress.org/support/users/sarjn15/)
 * (@sarjn15)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/wordpress-44-problems-with-plugin/#post-6837183)
 * I’m having the same problem as Andrew. Any fix to this yet? I tried whitelamps
   suggestion and it took my entire site down. Definitely not the fix. Where’s this
   at Mihai?
 *  [Mihai Joldis](https://wordpress.org/support/users/misulicus/)
 * (@misulicus)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/wordpress-44-problems-with-plugin/#post-6837185)
 * The latest 3.11.1 should have the fix inside it:
    [https://github.com/wp-e-commerce/WP-e-Commerce/commit/3e1eb5570a6d6373394635218466eff2834bec4a](https://github.com/wp-e-commerce/WP-e-Commerce/commit/3e1eb5570a6d6373394635218466eff2834bec4a)
 * [@sarjn15](https://wordpress.org/support/users/sarjn15/) can you check that file/
   line if the code is changed from null to ” ?
 *  [sarjn15](https://wordpress.org/support/users/sarjn15/)
 * (@sarjn15)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/wordpress-44-problems-with-plugin/#post-6837186)
 * I’m looking into it.
 *  [whitelamp](https://wordpress.org/support/users/whitelamp/)
 * (@whitelamp)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/wordpress-44-problems-with-plugin/#post-6837187)
 * [@sarjn15](https://wordpress.org/support/users/sarjn15/) – if it “took the entire
   site down” then you didn’t enter it right. Note that the end bit of my fix is
   two single quotes, not a double quote. But Mihai’s fix is the one to use, if 
   you don’t want to upgrade to 3.11.1.
 * We have ourselves since upgraded to 3.11.1 and as it turns out could probably
   have done that last night without any problems. But our priority then was simply
   to get back to being able to sell things. Upgrades we prefer to do in a more 
   controlled fashion.
 * Why this manifested itself after a WordPress upgrade I don’t know – any clues
   Mihai?
 *  [sarjn15](https://wordpress.org/support/users/sarjn15/)
 * (@sarjn15)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/wordpress-44-problems-with-plugin/#post-6837188)
 * Not sure if I’m looking at the right file.. My line 101 reads…
 *  * [@param](https://wordpress.org/support/users/param/) meta key name
 *  [sarjn15](https://wordpress.org/support/users/sarjn15/)
 * (@sarjn15)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/wordpress-44-problems-with-plugin/#post-6837189)
 * Also, I have upgraded my plugin to version 3.11.1
 *  [Mihai Joldis](https://wordpress.org/support/users/misulicus/)
 * (@misulicus)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/wordpress-44-problems-with-plugin/#post-6837190)
 * [@sarjn15](https://wordpress.org/support/users/sarjn15/) the file is: wp-e-commerce/
   wpsc-components/theme-engine-v1/helpers/ajax.php
 * [@whitelamp](https://wordpress.org/support/users/whitelamp/) I noticed the issue
   a while back while still on the beta WP versions. The git pull is from Oct 28
   so that’s about when i spotted the issue. Not sure if its WordPress or WP eCommerce
   related.
 *  [whitelamp](https://wordpress.org/support/users/whitelamp/)
 * (@whitelamp)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/wordpress-44-problems-with-plugin/#post-6837192)
 * And you still have the problem?
 *  [sarjn15](https://wordpress.org/support/users/sarjn15/)
 * (@sarjn15)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/wordpress-44-problems-with-plugin/#post-6837193)
 * Mihai,
 * Thanks for that! Checked the file. Line 101 has the two single quotes rather 
   than the null. Any other thoughts?
 *  [whitelamp](https://wordpress.org/support/users/whitelamp/)
 * (@whitelamp)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/wordpress-44-problems-with-plugin/#post-6837202)
 * [@mihai](https://wordpress.org/support/users/mihai/), sorry, I was asking sarjn15
   if they still had the problem.
 * [@sarjn15](https://wordpress.org/support/users/sarjn15/): time to start debugging
   I am afraid. Can you examine the database? Personally I upload a copy of the 
   adminer tool:
    [https://www.adminer.org/](https://www.adminer.org/) to do this.
 * If you can confirm that there’s an entry for a new order in the purchase logs
   table, but no corresponding entry in the cart contents table, then you know that
   the the cart contents are not getting saved. So you want to see what is going
   on inside save_to_db() inside cart-item.class.php. Depending on your hosting 
   you may be able to use error_log(); or – it’s ugly but it works – use lines like
   
   mail(‘you@domain.com’, ‘debug’, print_r($foo, true));
 *  [damodai](https://wordpress.org/support/users/damodai/)
 * (@damodai)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/wordpress-44-problems-with-plugin/#post-6837255)
 * Hi , I too experienced the same difficulty as detailed above
 * checking the error logs :
    database error [13-Dec-2015 01:14:53 UTC] WordPress
   database error Column ‘pnp’ cannot be null for query INSERT INTO `wp_wpsc_cart_contents`(`
   prodid`, `name`, `purchaseid`, `price`, `pnp`, `tax_charged`, `gst`, `quantity`,`
   donation`, `no_shipping`, `custom_message`, `files`, `meta`) VALUES (130, ‘DVD
   10’, 768, 19.950000, NULL, 0.000000, 0.000000, ‘1’, 0, 0, ”, ‘N;’, NULL) made
   by require(‘wp-blog-header.php’), require_once(‘wp-load.php’), require_once(‘
   wp-config.php’), require_once(‘wp-settings.php’), do_action(‘init’), call_user_func_array,
   wpsc_submit_checkout, wpsc_cart->save_to_db, wpsc_cart_item->save_to_db
 * the ‘pnp’ entry is null and causing th insert to fail.
 * I added a simple
    if($shipping == null) $shipping =”;
 * to line 511 in the cart-item.class.php just before the function call .
    I suspect
   there may be a more correct/elegant solution ?
 * Damian
 *  [theinternetplug](https://wordpress.org/support/users/theinternetplug/)
 * (@theinternetplug)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/wordpress-44-problems-with-plugin/#post-6837256)
 * That supressed the database error but did not solve the problem because now paypal
   says:
 * Unable to process payment. Please contact the merchant as the shipping address
   provided by the merchant is invalid, and the merchant has requested that your
   order must be shipped to that address.
 *  [Riverboat Captain](https://wordpress.org/support/users/riverboat-captain/)
 * (@riverboat-captain)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/wordpress-44-problems-with-plugin/#post-6837273)
 * Yup, I get the problem too.
 * Items are remembered in the cart as I go form page to page, but checkout at Paypal
   says nothing in cart. And I have 3.11.1
 *  [Riverboat Captain](https://wordpress.org/support/users/riverboat-captain/)
 * (@riverboat-captain)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/wordpress-44-problems-with-plugin/#post-6837274)
 * And neither of the above lines added to cart-item.class.php make any difference.

Viewing 15 replies - 1 through 15 (of 45 total)

1 [2](https://wordpress.org/support/topic/wordpress-44-problems-with-plugin/page/2/?output_format=md)
[3](https://wordpress.org/support/topic/wordpress-44-problems-with-plugin/page/3/?output_format=md)
[→](https://wordpress.org/support/topic/wordpress-44-problems-with-plugin/page/2/?output_format=md)

The topic ‘WordPress 4.4 Problems With Plugin’ 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/)

 * 45 replies
 * 13 participants
 * Last reply from: [mtvaccari](https://wordpress.org/support/users/mtvaccari/)
 * Last activity: [10 years, 4 months ago](https://wordpress.org/support/topic/wordpress-44-problems-with-plugin/page/3/#post-6837427)
 * Status: resolved