WP eCommerce - Version 3.11.2

Version Description

  • Fix: WordPress 4.4 introduced changes to the WPDB class that caused loosely typed data to fail upon insert, causing empty purchase logs.
Download this release

Release Info

Developer JustinSainton
Plugin Icon 128x128 WP eCommerce
Version 3.11.2
Comparing to
See all releases

Code changes from version 3.11.1 to 3.11.2

readme.txt CHANGED
@@ -1,10 +1,10 @@
1
  === WP eCommerce ===
2
  Contributors: JustinSainton
3
  Donate link: https://wpecommerce.org
4
- Tags: e-commerce, woocommerce, digital downloads, wp-e-commerce, shop, cart, paypal, authorize, stock control, ecommerce, shipping, tax
5
  Requires at least: 4.1
6
  Tested up to: 4.4
7
- Stable tag: 3.11.1
8
 
9
  WP eCommerce is a free, powerful plugin that empowers you to sell anything online, quickly and easily.
10
 
@@ -36,6 +36,10 @@ After upgrading from earlier versions look for link "Update Store". This will up
36
 
37
  == Changelog ==
38
 
 
 
 
 
39
  = 3.11.1 =
40
 
41
  * Fix: Amazon Payments caused fatal errors on PHP 5.2. See [#2026](https://github.com/wp-e-commerce/WP-e-Commerce/issues/2026).
1
  === WP eCommerce ===
2
  Contributors: JustinSainton
3
  Donate link: https://wpecommerce.org
4
+ Tags: e-commerce, digital downloads, wp-e-commerce, shop, cart, paypal, authorize, stock control, ecommerce, shipping, tax
5
  Requires at least: 4.1
6
  Tested up to: 4.4
7
+ Stable tag: 3.11.2
8
 
9
  WP eCommerce is a free, powerful plugin that empowers you to sell anything online, quickly and easily.
10
 
36
 
37
  == Changelog ==
38
 
39
+ = 3.11.2 =
40
+
41
+ * Fix: WordPress 4.4 introduced changes to the WPDB class that caused loosely typed data to fail upon insert, causing empty purchase logs.
42
+
43
  = 3.11.1 =
44
 
45
  * Fix: Amazon Payments caused fatal errors on PHP 5.2. See [#2026](https://github.com/wp-e-commerce/WP-e-Commerce/issues/2026).
wp-shopping-cart.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: WP eCommerce
4
  * Plugin URI: http://wpecommerce.org/
5
  * Description: A plugin that provides a WordPress Shopping Cart. See also: <a href="http://wpecommerce.org" target="_blank">WPeCommerce.org</a> | <a href="https://wordpress.org/support/plugin/wp-e-commerce/" target="_blank">Support Forum</a> | <a href="http://docs.wpecommerce.org/" target="_blank">Documentation</a>
6
- * Version: 3.11.1
7
  * Author: WP eCommerce
8
  * Author URI: http://wpecommerce.org/
9
  * Text Domain: wp-e-commerce
3
  * Plugin Name: WP eCommerce
4
  * Plugin URI: http://wpecommerce.org/
5
  * Description: A plugin that provides a WordPress Shopping Cart. See also: <a href="http://wpecommerce.org" target="_blank">WPeCommerce.org</a> | <a href="https://wordpress.org/support/plugin/wp-e-commerce/" target="_blank">Support Forum</a> | <a href="http://docs.wpecommerce.org/" target="_blank">Documentation</a>
6
+ * Version: 3.11.2
7
  * Author: WP eCommerce
8
  * Author URI: http://wpecommerce.org/
9
  * Text Domain: wp-e-commerce
wpsc-components/theme-engine-v1/helpers/template.php CHANGED
@@ -290,11 +290,12 @@ function wpsc_the_sticky_image( $product_id ) {
290
  * @return bool true or false
291
  */
292
  function wpsc_change_canonical_url( $url = '' ) {
293
- global $wpdb, $wp_query, $wpsc_page_titles;
294
 
295
- if ( $wp_query->is_single == true && 'wpsc-product' == $wp_query->query_vars['post_type']) {
296
  $url = get_permalink( $wp_query->get_queried_object()->ID );
297
  }
 
298
  return apply_filters( 'wpsc_change_canonical_url', $url );
299
  }
300
 
290
  * @return bool true or false
291
  */
292
  function wpsc_change_canonical_url( $url = '' ) {
293
+ global $wp_query;
294
 
295
+ if ( $wp_query->is_single && ( isset( $wp_query->query_vars['post_type'] ) && 'wpsc-product' == $wp_query->query_vars['post_type'] ) ) {
296
  $url = get_permalink( $wp_query->get_queried_object()->ID );
297
  }
298
+
299
  return apply_filters( 'wpsc_change_canonical_url', $url );
300
  }
301
 
wpsc-core/wpsc-constants.php CHANGED
@@ -55,15 +55,15 @@ function wpsc_core_constants() {
55
 
56
  // Define Plugin version
57
  if ( ! defined( 'WPSC_VERSION' ) ) {
58
- define( 'WPSC_VERSION' , '3.11.1' );
59
  }
60
 
61
  if ( ! defined( 'WPSC_MINOR_VERSION' ) ) {
62
- define( 'WPSC_MINOR_VERSION' , 'd31363e' );
63
  }
64
 
65
  if ( ! defined( 'WPSC_PRESENTABLE_VERSION' ) ) {
66
- define( 'WPSC_PRESENTABLE_VERSION', '3.11.1' );
67
  }
68
 
69
  // Define a salt to use when we hash, WPSC_SALT may be defined for us in our config file, so check first
55
 
56
  // Define Plugin version
57
  if ( ! defined( 'WPSC_VERSION' ) ) {
58
+ define( 'WPSC_VERSION' , '3.11.2' );
59
  }
60
 
61
  if ( ! defined( 'WPSC_MINOR_VERSION' ) ) {
62
+ define( 'WPSC_MINOR_VERSION' , 'ffbc44e' );
63
  }
64
 
65
  if ( ! defined( 'WPSC_PRESENTABLE_VERSION' ) ) {
66
+ define( 'WPSC_PRESENTABLE_VERSION', '3.11.2' );
67
  }
68
 
69
  // Define a salt to use when we hash, WPSC_SALT may be defined for us in our config file, so check first
wpsc-includes/cart-item.class.php CHANGED
@@ -509,37 +509,37 @@ class wpsc_cart_item {
509
  }
510
 
511
  $wpdb->insert(
512
- WPSC_TABLE_CART_CONTENTS,
513
- array(
514
- 'prodid' => $this->product_id,
515
- 'name' => $this->get_title(),
516
- 'purchaseid' => $purchase_log_id,
517
- 'price' => $this->unit_price,
518
- 'pnp' => $shipping,
519
- 'tax_charged' => $tax,
520
- 'gst' => $tax_rate,
521
- 'quantity' => $this->quantity,
522
- 'donation' => $this->is_donation,
523
- 'no_shipping' => 0,
524
- 'custom_message' => $this->custom_message,
525
- 'files' => serialize($this->custom_file),
526
- 'meta' => NULL
527
- ),
528
- array(
529
- '%d',
530
- '%s',
531
- '%d',
532
- '%f',
533
- '%f',
534
- '%f',
535
- '%f',
536
- '%s',
537
- '%d',
538
- '%d',
539
- '%s',
540
- '%s',
541
- '%s'
542
- )
543
  );
544
 
545
  $cart_item_id = $wpdb->get_var( "SELECT " . $wpdb->insert_id . " AS `id` FROM `".WPSC_TABLE_CART_CONTENTS."` LIMIT 1");
509
  }
510
 
511
  $wpdb->insert(
512
+ WPSC_TABLE_CART_CONTENTS,
513
+ array(
514
+ 'prodid' => $this->product_id,
515
+ 'name' => $this->get_title(),
516
+ 'purchaseid' => $purchase_log_id,
517
+ 'price' => $this->unit_price,
518
+ 'pnp' => floatval( $shipping ),
519
+ 'tax_charged' => $tax,
520
+ 'gst' => floatval( $tax_rate ),
521
+ 'quantity' => $this->quantity,
522
+ 'donation' => $this->is_donation,
523
+ 'no_shipping' => 0,
524
+ 'custom_message' => $this->custom_message,
525
+ 'files' => serialize( $this->custom_file ),
526
+ 'meta' => null
527
+ ),
528
+ array(
529
+ '%d',
530
+ '%s',
531
+ '%d',
532
+ '%f',
533
+ '%f',
534
+ '%f',
535
+ '%f',
536
+ '%s',
537
+ '%d',
538
+ '%d',
539
+ '%s',
540
+ '%s',
541
+ '%s'
542
+ )
543
  );
544
 
545
  $cart_item_id = $wpdb->get_var( "SELECT " . $wpdb->insert_id . " AS `id` FROM `".WPSC_TABLE_CART_CONTENTS."` LIMIT 1");
wpsc-includes/checkout-form-data.class.php CHANGED
@@ -194,4 +194,4 @@ class WPSC_Checkout_Form_Data {
194
 
195
  wpsc_save_customer_details( $customer_details );
196
  }
197
- }
194
 
195
  wpsc_save_customer_details( $customer_details );
196
  }
197
+ }
wpsc-shipping/australiapost.php CHANGED
@@ -31,7 +31,7 @@ class australiapost {
31
  /**
32
  * Constructor
33
  */
34
- function __construct () {
35
  $this->internal_name = 'australiapost';
36
  $this->name = __( 'Australia Post', 'wp-e-commerce' );
37
  $this->is_external = true;
31
  /**
32
  * Constructor
33
  */
34
+ public function __construct () {
35
  $this->internal_name = 'australiapost';
36
  $this->name = __( 'Australia Post', 'wp-e-commerce' );
37
  $this->is_external = true;