WP eCommerce - Version 3.8.9.4

Version Description

  • Fix: "No shipping quotes" error is displayed when selecting "Shipping same as billing".
  • Fix: Avoid flooding transient data when site's feed is being visited by bots.
  • Fix: Blank Checkout page for some certain installation when Shipping is enabled.
  • Fix: Can't add to cart on some server.
  • Fix: Fatal error when viewing product variation iframe, because _wp_admin_html_begin() does not exist on older WordPress versions.
  • Fix: MySQL error/warning in wpsc_filter_specialwidget_where().
  • Fix: Only show attachment fields when viewed on an edit product page.
  • Fix: PHP Notice in cart.class.php.
  • Fix: Properly escape columns in admin products page.
  • Fix: Purchase log's item names are not translatable via qTranslate.
  • Fix: Shipping same as billing saves "State" field label as the shipping region.
  • Fix: Shipwire settings are not updated.
  • Fix: Shipwire syncing doesn't take into consideration products in trash, or multiple products using the same SKUs (as in WPML)
  • Fix: Specials widget is empty when there are no product with variation sales.
  • Fix: Variation sets are not being sorted on the front-end.
  • Fix: WPEC doesn't cooperate with WP 3.5 media UI.
  • Fix: wpsc_pre_transaction_results filter is ignored.
  • Make sure admin styles are enqueued for product variations iframe in older version of WordPress.
Download this release

Release Info

Developer garyc40
Plugin Icon 128x128 WP eCommerce
Version 3.8.9.4
Comparing to
See all releases

Code changes from version 3.8.9.3 to 3.8.9.4

readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: mufasa, mychelle, garyc40, JustinSainton
3
  Donate link: http://getshopped.org
4
  Tags: e-commerce, wp-e-commerce, shop, cart, paypal, authorize, stock control, ecommerce, shipping, tax
5
  Requires at least: 3.1
6
- Tested up to: 3.4.2
7
- Stable tag: 3.8.9.3
8
 
9
  WP e-Commerce is a free WordPress Shopping Cart Plugin that lets customers buy your products, services and digital downloads online.
10
 
@@ -155,6 +155,26 @@ Before updating please make a backup of your existing files and database. Just i
155
  After upgrading from earlier versions look for link "Update Store". This will update your database structure to work with new version.
156
 
157
  == Changelog ==
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
158
  = 3.8.9.3 =
159
  * New: Add support for quantity field in default grid view template.
160
  * New: Let plugins add new column to product variation list table via filter 'wpsc_manage_product_variations_custom_column'.
3
  Donate link: http://getshopped.org
4
  Tags: e-commerce, wp-e-commerce, shop, cart, paypal, authorize, stock control, ecommerce, shipping, tax
5
  Requires at least: 3.1
6
+ Tested up to: 3.5
7
+ Stable tag: 3.8.9.4
8
 
9
  WP e-Commerce is a free WordPress Shopping Cart Plugin that lets customers buy your products, services and digital downloads online.
10
 
155
  After upgrading from earlier versions look for link "Update Store". This will update your database structure to work with new version.
156
 
157
  == Changelog ==
158
+ = 3.8.9.4 =
159
+ * Fix: "No shipping quotes" error is displayed when selecting "Shipping same as billing".
160
+ * Fix: Avoid flooding transient data when site's feed is being visited by bots.
161
+ * Fix: Blank Checkout page for some certain installation when Shipping is enabled.
162
+ * Fix: Can't add to cart on some server.
163
+ * Fix: Fatal error when viewing product variation iframe, because _wp_admin_html_begin() does not exist on older WordPress versions.
164
+ * Fix: MySQL error/warning in _wpsc_filter_special_widget_where().
165
+ * Fix: Only show attachment fields when viewed on an edit product page.
166
+ * Fix: PHP Notice in cart.class.php.
167
+ * Fix: Properly escape columns in admin products page.
168
+ * Fix: Purchase log's item names are not translatable via qTranslate.
169
+ * Fix: Shipping same as billing saves "State" field label as the shipping region.
170
+ * Fix: Shipwire settings are not updated.
171
+ * Fix: Shipwire syncing doesn't take into consideration products in trash, or multiple products using the same SKUs (as in WPML)
172
+ * Fix: Specials widget is empty when there are no product with variation sales.
173
+ * Fix: Variation sets are not being sorted on the front-end.
174
+ * Fix: WPEC doesn't cooperate with WP 3.5 media UI.
175
+ * Fix: wpsc_pre_transaction_results filter is ignored.
176
+ * Make sure admin styles are enqueued for product variations iframe in older version of WordPress.
177
+
178
  = 3.8.9.3 =
179
  * New: Add support for quantity field in default grid view template.
180
  * New: Let plugins add new column to product variation list table via filter 'wpsc_manage_product_variations_custom_column'.
wp-shopping-cart.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: WP e-Commerce
4
  * Plugin URI: http://getshopped.org/
5
  * Description: A plugin that provides a WordPress Shopping Cart. See also: <a href="http://getshopped.org" target="_blank">GetShopped.org</a> | <a href="http://getshopped.org/forums/" target="_blank">Support Forum</a> | <a href="http://docs.getshopped.org/" target="_blank">Documentation</a>
6
- * Version: 3.8.9.3
7
  * Author: Instinct Entertainment
8
  * Author URI: http://getshopped.org/
9
  **/
3
  * Plugin Name: WP e-Commerce
4
  * Plugin URI: http://getshopped.org/
5
  * Description: A plugin that provides a WordPress Shopping Cart. See also: <a href="http://getshopped.org" target="_blank">GetShopped.org</a> | <a href="http://getshopped.org/forums/" target="_blank">Support Forum</a> | <a href="http://docs.getshopped.org/" target="_blank">Documentation</a>
6
+ * Version: 3.8.9.4
7
  * Author: Instinct Entertainment
8
  * Author URI: http://getshopped.org/
9
  **/
wpsc-admin/admin-form-functions.php CHANGED
@@ -30,7 +30,7 @@ $conditions = maybe_unserialize($coupon['condition']);
30
  $output .= " <select name='edit_coupon[".$id."][is-percentage]'>";
31
  $output .= " <option value='0' ".(($coupon['is-percentage'] == 0) ? "selected='true'" : '')." >$</option>\n\r";//
32
  $output .= " <option value='1' ".(($coupon['is-percentage'] == 1) ? "selected='true'" : '')." >%</option>\n\r";
33
- $output .= " <option value='2' ".(($coupon['is-percentage'] == 2) ? "selected='true'" : '')." >" . esc_html__( 'Free shipping', 'wpsc' ) . "'</option>\n\r";
34
  $output .= " </select>\n\r";
35
  $output .= " </td>\n\r";
36
  $output .= " <td>\n\r";
30
  $output .= " <select name='edit_coupon[".$id."][is-percentage]'>";
31
  $output .= " <option value='0' ".(($coupon['is-percentage'] == 0) ? "selected='true'" : '')." >$</option>\n\r";//
32
  $output .= " <option value='1' ".(($coupon['is-percentage'] == 1) ? "selected='true'" : '')." >%</option>\n\r";
33
+ $output .= " <option value='2' ".(($coupon['is-percentage'] == 2) ? "selected='true'" : '')." >" . esc_html__( 'Free shipping', 'wpsc' ) . "</option>\n\r";
34
  $output .= " </select>\n\r";
35
  $output .= " </td>\n\r";
36
  $output .= " <td>\n\r";
wpsc-admin/css/admin.css CHANGED
@@ -2194,4 +2194,9 @@ table.purchase-logs tr:hover .column-id .delete {
2194
 
2195
  .wpsc-product-variation-title {
2196
  margin-left: 60px;
 
 
 
 
 
2197
  }
2194
 
2195
  .wpsc-product-variation-title {
2196
  margin-left: 60px;
2197
+ }
2198
+
2199
+ .compat-field-wpsc_image_size input[type="radio"] {
2200
+ width: auto;
2201
+ margin-right:5px;
2202
  }
wpsc-admin/display-items.page.php CHANGED
@@ -117,7 +117,7 @@ function _wpsc_manage_products_column_weight( $post, $post_id, $has_variations )
117
  break;
118
  }
119
  echo $weight.$unit;
120
- echo '<div id="inline_' . $post->ID . '_weight" class="hidden">' . $weight . '</div>';
121
  }
122
  add_action( 'wpsc_manage_products_column_weight', '_wpsc_manage_products_column_weight', 10, 3 );
123
 
@@ -142,7 +142,7 @@ function _wpsc_manage_products_column_stock( $post, $post_id, $has_variations )
142
  }
143
 
144
  echo $stock;
145
- echo '<div id="inline_' . $post->ID . '_stock" class="hidden">' . $stock . '</div>';
146
 
147
  }
148
  add_action( 'wpsc_manage_products_column_stock', '_wpsc_manage_products_column_stock', 10, 3 );
@@ -203,7 +203,7 @@ function _wpsc_manage_products_column_sku( $post, $post_id ) {
203
  $sku = __('N/A', 'wpsc');
204
 
205
  echo $sku;
206
- echo '<div id="inline_' . $post->ID . '_sku" class="hidden">' . $sku . '</div>';
207
  }
208
  add_action( 'wpsc_manage_products_column_sku', '_wpsc_manage_products_column_sku', 10, 2 );
209
 
117
  break;
118
  }
119
  echo $weight.$unit;
120
+ echo '<div id="inline_' . $post->ID . '_weight" class="hidden">' . esc_html( $weight ) . '</div>';
121
  }
122
  add_action( 'wpsc_manage_products_column_weight', '_wpsc_manage_products_column_weight', 10, 3 );
123
 
142
  }
143
 
144
  echo $stock;
145
+ echo '<div id="inline_' . $post->ID . '_stock" class="hidden">' . esc_html( $stock ) . '</div>';
146
 
147
  }
148
  add_action( 'wpsc_manage_products_column_stock', '_wpsc_manage_products_column_stock', 10, 3 );
203
  $sku = __('N/A', 'wpsc');
204
 
205
  echo $sku;
206
+ echo '<div id="inline_' . $post->ID . '_sku" class="hidden">' . esc_html( $sku ) . '</div>';
207
  }
208
  add_action( 'wpsc_manage_products_column_sku', '_wpsc_manage_products_column_sku', 10, 2 );
209
 
wpsc-admin/includes/display-items-functions.php CHANGED
@@ -793,20 +793,24 @@ function wpsc_form_multipart_encoding() {
793
  }
794
 
795
  add_action( 'post_edit_form_tag', 'wpsc_form_multipart_encoding' );
796
- add_filter( 'media_buttons_context', 'change_context' );
797
- add_filter( 'image_upload_iframe_src', "change_link" );
 
 
 
 
798
  /*
799
  * Modifications to Media Gallery
800
  */
801
 
802
  if ( ( isset( $_REQUEST['parent_page'] ) && ( $_REQUEST['parent_page'] == 'wpsc-edit-products' ) ) ) {
803
  add_filter( 'media_upload_tabs', 'wpsc_media_upload_tab_gallery', 12 );
804
- add_filter( 'attachment_fields_to_save', 'wpsc_save_attachment_fields', 9, 2 );
805
  add_filter( 'media_upload_form_url', 'wpsc_media_upload_url', 9, 1 );
806
  add_action( 'admin_head', 'wpsc_gallery_css_mods' );
807
  }
808
  add_filter( 'gettext', 'wpsc_filter_delete_text', 12 , 3 );
809
  add_filter( 'attachment_fields_to_edit', 'wpsc_attachment_fields', 11, 2 );
 
810
  add_filter( 'gettext', 'wpsc_filter_feature_image_text', 12, 3 );
811
  add_filter( 'gettext_with_context', 'wpsc_filter_gettex_with_context', 12, 4);
812
 
@@ -841,7 +845,6 @@ function wpsc_filter_gettex_with_context( $translation, $text, $context, $domain
841
  * @return string The translated / filtered text.
842
  */
843
  function wpsc_filter_feature_image_text( $translation, $text, $domain ) {
844
-
845
  if ( 'Use as featured image' == $text && isset( $_REQUEST['post_id'] ) ) {
846
  $post = get_post( $_REQUEST['post_id'] );
847
  if ( $post->post_type != 'wpsc-product' ) return $translation;
@@ -855,15 +858,16 @@ function wpsc_filter_feature_image_text( $translation, $text, $domain ) {
855
  }
856
  function wpsc_attachment_fields( $form_fields, $post ) {
857
  $out = '';
858
- if(isset($_GET["post_id"]))
859
- $parent_post = get_post( absint($_GET["post_id"]) );
 
860
  else
861
  $parent_post = get_post( $post->post_parent );
862
 
863
  if ( $parent_post->post_type == "wpsc-product" ) {
864
 
865
  //Unfortunate hack, as I'm not sure why the From Computer tab doesn't process filters the same way the Gallery does
866
-
867
  echo '
868
  <script type="text/javascript">
869
 
@@ -886,6 +890,8 @@ function wpsc_attachment_fields( $form_fields, $post ) {
886
  });
887
 
888
  </script>';
 
 
889
  $size_names = array( 'small-product-thumbnail' => __( 'Default Product Thumbnail Size', 'wpsc' ), 'medium-single-product' => __( 'Single Product Image Size', 'wpsc' ), 'full' => __( 'Full Size', 'wpsc' ) );
890
 
891
  $check = get_post_meta( $post->ID, '_wpsc_selected_image_size', true );
@@ -897,16 +903,8 @@ function wpsc_attachment_fields( $form_fields, $post ) {
897
  $settings_height = get_option( 'single_view_image_height' );
898
 
899
  // regenerate size metadata in case it's missing
900
- if ( ! $check || $current_size['width'] != $settings_width || $current_size['height'] != $settings_height ) {
901
- if ( ! $metadata = wp_get_attachment_metadata( $post->ID ) )
902
- $metadata = array();
903
- if ( empty( $metadata['sizes'] ) )
904
- $metadata['sizes'] = array();
905
- $file = get_attached_file( $post->ID );
906
- $generated = wp_generate_attachment_metadata( $post->ID, $file );
907
- $metadata['sizes'] = array_merge((array) $metadata['sizes'], (array) $generated['sizes'] );
908
-
909
- wp_update_attachment_metadata( $post->ID, $metadata );
910
  }
911
 
912
  //This loop attaches the custom thumbnail/single image sizes to this page
@@ -917,7 +915,7 @@ function wpsc_attachment_fields( $form_fields, $post ) {
917
  $css_id = "image-size-{$size}-{$post->ID}";
918
  // if this size is the default but that's not available, don't select it
919
 
920
- $html = "<div class='image-size-item'><input type='radio' " . disabled( $enabled, false, false ) . "name='attachments[$post->ID][image-size]' id='{$css_id}' value='{$size}' " . checked( $size, $check, false ) . " />";
921
 
922
  $html .= "<label for='{$css_id}'>$name</label>";
923
  // only show the dimensions if that choice is available
@@ -932,7 +930,7 @@ function wpsc_attachment_fields( $form_fields, $post ) {
932
  unset( $form_fields['post_excerpt'], $form_fields['image_url'], $form_fields['post_content'], $form_fields['post_title'], $form_fields['url'], $form_fields['align'], $form_fields['image_alt']['helps'], $form_fields["image-size"] );
933
  $form_fields['image_alt']['helps'] = __( 'Alt text for the product image, e.g. &#8220;Rockstar T-Shirt&#8221;', 'wpsc' );
934
 
935
- $form_fields["image-size"] = array(
936
  'label' => __( 'Single Product Page Thumbnail:', 'wpsc' ),
937
  'input' => 'html',
938
  'html' => $out,
@@ -954,21 +952,19 @@ function wpsc_attachment_fields( $form_fields, $post ) {
954
  "helps" => "<span style='text-align:left; clear:both; display:block; padding-top:3px;'>" . __( 'Custom thumbnail size for this image on the main Product Page', 'wpsc') . "</span>",
955
  "html" => $custom_thumb_html
956
  );
957
-
958
  }
959
  return $form_fields;
960
 
961
  }
962
  function wpsc_save_attachment_fields( $post, $attachment ) {
963
-
964
  if ( isset ( $attachment['wpsc_custom_thumb_w'] ) )
965
  update_post_meta( $post['ID'], '_wpsc_custom_thumb_w', $attachment['wpsc_custom_thumb_w'] );
966
 
967
  if ( isset ( $attachment['wpsc_custom_thumb_h'] ) )
968
  update_post_meta( $post['ID'], '_wpsc_custom_thumb_h', $attachment['wpsc_custom_thumb_h'] );
969
 
970
- if ( isset ( $attachment['image-size'] ) )
971
- update_post_meta( $post['ID'], '_wpsc_selected_image_size', $attachment['image-size'] );
972
 
973
  return $post;
974
  }
793
  }
794
 
795
  add_action( 'post_edit_form_tag', 'wpsc_form_multipart_encoding' );
796
+
797
+ if ( version_compare( get_bloginfo( 'version' ), '3.5', '<' ) ) {
798
+ add_filter( 'media_buttons_context', 'change_context' );
799
+ add_filter( 'image_upload_iframe_src', "change_link" );
800
+ }
801
+
802
  /*
803
  * Modifications to Media Gallery
804
  */
805
 
806
  if ( ( isset( $_REQUEST['parent_page'] ) && ( $_REQUEST['parent_page'] == 'wpsc-edit-products' ) ) ) {
807
  add_filter( 'media_upload_tabs', 'wpsc_media_upload_tab_gallery', 12 );
 
808
  add_filter( 'media_upload_form_url', 'wpsc_media_upload_url', 9, 1 );
809
  add_action( 'admin_head', 'wpsc_gallery_css_mods' );
810
  }
811
  add_filter( 'gettext', 'wpsc_filter_delete_text', 12 , 3 );
812
  add_filter( 'attachment_fields_to_edit', 'wpsc_attachment_fields', 11, 2 );
813
+ add_filter( 'attachment_fields_to_save', 'wpsc_save_attachment_fields', 9, 2 );
814
  add_filter( 'gettext', 'wpsc_filter_feature_image_text', 12, 3 );
815
  add_filter( 'gettext_with_context', 'wpsc_filter_gettex_with_context', 12, 4);
816
 
845
  * @return string The translated / filtered text.
846
  */
847
  function wpsc_filter_feature_image_text( $translation, $text, $domain ) {
 
848
  if ( 'Use as featured image' == $text && isset( $_REQUEST['post_id'] ) ) {
849
  $post = get_post( $_REQUEST['post_id'] );
850
  if ( $post->post_type != 'wpsc-product' ) return $translation;
858
  }
859
  function wpsc_attachment_fields( $form_fields, $post ) {
860
  $out = '';
861
+
862
+ if( isset( $_REQUEST["post_id"] ) )
863
+ $parent_post = get_post( absint( $_REQUEST["post_id"] ) );
864
  else
865
  $parent_post = get_post( $post->post_parent );
866
 
867
  if ( $parent_post->post_type == "wpsc-product" ) {
868
 
869
  //Unfortunate hack, as I'm not sure why the From Computer tab doesn't process filters the same way the Gallery does
870
+ ob_start();
871
  echo '
872
  <script type="text/javascript">
873
 
890
  });
891
 
892
  </script>';
893
+ $out .= ob_get_clean();
894
+
895
  $size_names = array( 'small-product-thumbnail' => __( 'Default Product Thumbnail Size', 'wpsc' ), 'medium-single-product' => __( 'Single Product Image Size', 'wpsc' ), 'full' => __( 'Full Size', 'wpsc' ) );
896
 
897
  $check = get_post_meta( $post->ID, '_wpsc_selected_image_size', true );
903
  $settings_height = get_option( 'single_view_image_height' );
904
 
905
  // regenerate size metadata in case it's missing
906
+ if ( ! $check || ( $current_size['width'] != $settings_width && $current_size['height'] != $settings_height ) ) {
907
+ _wpsc_regenerate_thumbnail_size( $post->ID, $check );
 
 
 
 
 
 
 
 
908
  }
909
 
910
  //This loop attaches the custom thumbnail/single image sizes to this page
915
  $css_id = "image-size-{$size}-{$post->ID}";
916
  // if this size is the default but that's not available, don't select it
917
 
918
+ $html = "<div class='image-size-item'><input type='radio' " . disabled( $enabled, false, false ) . "name='attachments[$post->ID][wpsc_image_size]' id='{$css_id}' value='{$size}' " . checked( $size, $check, false ) . " />";
919
 
920
  $html .= "<label for='{$css_id}'>$name</label>";
921
  // only show the dimensions if that choice is available
930
  unset( $form_fields['post_excerpt'], $form_fields['image_url'], $form_fields['post_content'], $form_fields['post_title'], $form_fields['url'], $form_fields['align'], $form_fields['image_alt']['helps'], $form_fields["image-size"] );
931
  $form_fields['image_alt']['helps'] = __( 'Alt text for the product image, e.g. &#8220;Rockstar T-Shirt&#8221;', 'wpsc' );
932
 
933
+ $form_fields["wpsc_image_size"] = array(
934
  'label' => __( 'Single Product Page Thumbnail:', 'wpsc' ),
935
  'input' => 'html',
936
  'html' => $out,
952
  "helps" => "<span style='text-align:left; clear:both; display:block; padding-top:3px;'>" . __( 'Custom thumbnail size for this image on the main Product Page', 'wpsc') . "</span>",
953
  "html" => $custom_thumb_html
954
  );
 
955
  }
956
  return $form_fields;
957
 
958
  }
959
  function wpsc_save_attachment_fields( $post, $attachment ) {
 
960
  if ( isset ( $attachment['wpsc_custom_thumb_w'] ) )
961
  update_post_meta( $post['ID'], '_wpsc_custom_thumb_w', $attachment['wpsc_custom_thumb_w'] );
962
 
963
  if ( isset ( $attachment['wpsc_custom_thumb_h'] ) )
964
  update_post_meta( $post['ID'], '_wpsc_custom_thumb_h', $attachment['wpsc_custom_thumb_h'] );
965
 
966
+ if ( isset ( $attachment['wpsc_image_size'] ) )
967
+ update_post_meta( $post['ID'], '_wpsc_selected_image_size', $attachment['wpsc_image_size'] );
968
 
969
  return $post;
970
  }
wpsc-admin/includes/product-variations-page.class.php CHANGED
@@ -86,6 +86,9 @@ class WPSC_Product_Variations_Page
86
  $admin_body_class = $hook_suffix;
87
  $post_type_object = get_post_type_object( 'wpsc-product' );
88
 
 
 
 
89
  wp_enqueue_style( 'colors' );
90
  wp_enqueue_style( 'ie' );
91
  wp_enqueue_script( 'common' );
@@ -98,6 +101,7 @@ class WPSC_Product_Variations_Page
98
  $callback = "callback_tab_manage";
99
 
100
  $this->$callback();
 
101
  @header('Content-Type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset'));
102
  require_once( WPSC_FILE_PATH . "/wpsc-admin/includes/product-variations.page.php" );
103
  }
@@ -341,4 +345,31 @@ class WPSC_Product_Variations_Page
341
  exit;
342
  }
343
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
344
  }
86
  $admin_body_class = $hook_suffix;
87
  $post_type_object = get_post_type_object( 'wpsc-product' );
88
 
89
+ wp_enqueue_style( 'global' );
90
+ wp_enqueue_style( 'wp-admin' );
91
+ wp_enqueue_style( 'buttons' );
92
  wp_enqueue_style( 'colors' );
93
  wp_enqueue_style( 'ie' );
94
  wp_enqueue_script( 'common' );
101
  $callback = "callback_tab_manage";
102
 
103
  $this->$callback();
104
+
105
  @header('Content-Type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset'));
106
  require_once( WPSC_FILE_PATH . "/wpsc-admin/includes/product-variations.page.php" );
107
  }
345
  exit;
346
  }
347
  }
348
+ }
349
+
350
+ /**
351
+ * Wrapper for _wp_admin_html_begin(), which might not be available on older
352
+ * WordPress versions.
353
+ *
354
+ * @access private
355
+ * @since 3.8.9.4
356
+ */
357
+ function _wpsc_admin_html_begin() {
358
+ if ( function_exists( '_wp_admin_html_begin' ) ) {
359
+ _wp_admin_html_begin();
360
+ return;
361
+ }
362
+
363
+ $admin_html_class = ( is_admin_bar_showing() ) ? 'wp-toolbar' : '';
364
+ ?>
365
+ <!DOCTYPE html>
366
+ <!--[if IE 8]>
367
+ <html xmlns="http://www.w3.org/1999/xhtml" class="ie8 <?php echo $admin_html_class; ?>" <?php do_action('admin_xml_ns'); ?> <?php language_attributes(); ?>>
368
+ <![endif]-->
369
+ <!--[if !(IE 8) ]><!-->
370
+ <html xmlns="http://www.w3.org/1999/xhtml" class="<?php echo $admin_html_class; ?>" <?php do_action('admin_xml_ns'); ?> <?php language_attributes(); ?>>
371
+ <!--<![endif]-->
372
+ <head>
373
+ <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" />
374
+ <?php
375
  }
wpsc-admin/includes/product-variations.page.php CHANGED
@@ -1,4 +1,4 @@
1
- <?php _wp_admin_html_begin(); ?>
2
  <title><?php esc_html_e( 'Manage Product Variations', 'wpsc' ); ?></title>
3
  <script type="text/javascript">
4
  addLoadEvent = function(func){if(typeof jQuery!="undefined")jQuery(document).ready(func);else if(typeof wpOnload!='function'){wpOnload=func;}else{var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}};
1
+ <?php _wpsc_admin_html_begin(); ?>
2
  <title><?php esc_html_e( 'Manage Product Variations', 'wpsc' ); ?></title>
3
  <script type="text/javascript">
4
  addLoadEvent = function(func){if(typeof jQuery!="undefined")jQuery(document).ready(func);else if(typeof wpOnload!='function'){wpOnload=func;}else{var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}};
wpsc-admin/js/admin.js CHANGED
@@ -360,11 +360,6 @@ jQuery(document).ready(function(){
360
  }
361
  );
362
 
363
-
364
- jQuery("a.thickbox").livequery(function(){
365
- tb_init(this);
366
- });
367
-
368
  jQuery("div.admin_product_name a.shorttag_toggle").livequery(function(){
369
  jQuery(this).toggle(
370
  function () {
360
  }
361
  );
362
 
 
 
 
 
 
363
  jQuery("div.admin_product_name a.shorttag_toggle").livequery(function(){
364
  jQuery(this).toggle(
365
  function () {
wpsc-admin/js/settings-page.js CHANGED
@@ -918,7 +918,7 @@
918
  spinner = element.siblings('.ajax-feedback'),
919
  post_data = {
920
  action : 'sync_shipwire_products',
921
- nonce : WPSC_Settings_Page.nonce
922
  },
923
  ajax_callback = function(response) {
924
  $('<div class="updated shipwire-update"><p><strong>' + response.tracking + '<br />' + response.inventory + '</strong></p></div>').
@@ -928,7 +928,6 @@
928
  fadeOut('slow');
929
  spinner.toggleClass('ajax-feedback-active');
930
  };
931
-
932
  spinner.toggleClass('ajax-feedback-active');
933
  $.post(ajaxurl, post_data, ajax_callback, 'json');
934
  return false;
918
  spinner = element.siblings('.ajax-feedback'),
919
  post_data = {
920
  action : 'sync_shipwire_products',
921
+ nonce : WPSC_Settings_Page.shipping_module_settings_form_nonce
922
  },
923
  ajax_callback = function(response) {
924
  $('<div class="updated shipwire-update"><p><strong>' + response.tracking + '<br />' + response.inventory + '</strong></p></div>').
928
  fadeOut('slow');
929
  spinner.toggleClass('ajax-feedback-active');
930
  };
 
931
  spinner.toggleClass('ajax-feedback-active');
932
  $.post(ajaxurl, post_data, ajax_callback, 'json');
933
  return false;
wpsc-core/js/wp-e-commerce.js CHANGED
@@ -64,6 +64,7 @@
64
  //End Share this JS
65
 
66
  function wpsc_shipping_same_as_billing(){
 
67
  jQuery('#shippingsameasbillingmessage').slideDown('slow');
68
  jQuery("input[title='billingfirstname'], input[title='billinglastname'], textarea[title='billingaddress'], input[title='billingcity'], input[title='billingpostcode'], input[title='billingphone'], input[title='billingfirstname'], input[title='billingstate']").unbind('change', wpsc_shipping_same_as_billing).unbind('keyup', wpsc_shipping_same_as_billing).keyup(wpsc_shipping_same_as_billing).change(wpsc_shipping_same_as_billing);
69
 
@@ -109,7 +110,7 @@
109
  jQuery(fields[i][1]).addClass('intra-field-label');
110
  }
111
 
112
- if( jQuery("input[title='billingstate']").length ){
113
  jQuery("input[title='shippingstate']").val(jQuery("input[title='billingstate']").val());
114
  jQuery("input[title='shippingstate']").parents('tr:first').hide();
115
  if(!jQuery("input[title='billingstate']").hasClass('intra-field-label'))
@@ -210,7 +211,6 @@ jQuery(document).ready(function ($) {
210
  wpsc_shipping_same_as_billing();
211
 
212
  jQuery("#shippingSameBilling").change(function(){
213
-
214
  if(jQuery(this).is(":checked")){
215
  var data = {
216
  action: 'wpsc_shipping_same_as_billing',
@@ -617,4 +617,4 @@ jQuery(document).ready(function(){
617
  });
618
 
619
  //MD5 function for gravatars
620
- eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('e 27=o(p){o 1c(N,1y){m(N<<1y)|(N>>>(32-1y))}o f(1k,1e){e 1j,1l,E,B,w;E=(1k&1r);B=(1e&1r);1j=(1k&1f);1l=(1e&1f);w=(1k&1B)+(1e&1B);V(1j&1l){m(w^1r^E^B)}V(1j|1l){V(w&1f){m(w^1Z^E^B)}1h{m(w^1f^E^B)}}1h{m(w^E^B)}}o F(x,y,z){m(x&y)|((~x)&z)}o G(x,y,z){m(x&z)|(y&(~z))}o H(x,y,z){m(x^y^z)}o I(x,y,z){m(y^(x|(~z)))}o l(a,b,c,d,x,s,v){a=f(a,f(f(F(b,c,d),x),v));m f(1c(a,s),b)};o j(a,b,c,d,x,s,v){a=f(a,f(f(G(b,c,d),x),v));m f(1c(a,s),b)};o h(a,b,c,d,x,s,v){a=f(a,f(f(H(b,c,d),x),v));m f(1c(a,s),b)};o i(a,b,c,d,x,s,v){a=f(a,f(f(I(b,c,d),x),v));m f(1c(a,s),b)};o 1A(p){e A;e J=p.1g;e 1q=J+8;e 1D=(1q-(1q%1G))/1G;e 1m=(1D+1)*16;e t=1z(1m-1);e K=0;e q=0;24(q<J){A=(q-(q%4))/4;K=(q%4)*8;t[A]=(t[A]|(p.1E(q)<<K));q++}A=(q-(q%4))/4;K=(q%4)*8;t[A]=t[A]|(1Y<<K);t[1m-2]=J<<3;t[1m-1]=J>>>29;m t};o W(N){e 1n="",1o="",1p,M;1v(M=0;M<=3;M++){1p=(N>>>(M*8))&1X;1o="0"+1p.1U(16);1n=1n+1o.1V(1o.1g-2,2)}m 1n};o 1C(p){p=p.1W(/\\r\\n/g,"\\n");e u="";1v(e n=0;n<p.1g;n++){e c=p.1E(n);V(c<1i){u+=D.C(c)}1h V((c>1T)&&(c<25)){u+=D.C((c>>6)|26);u+=D.C((c&1s)|1i)}1h{u+=D.C((c>>12)|2c);u+=D.C(((c>>6)&1s)|1i);u+=D.C((c&1s)|1i)}}m u};e x=1z();e k,1t,1u,1x,1w,a,b,c,d;e Z=7,Y=12,19=17,L=22;e S=5,R=9,Q=14,P=20;e T=4,U=11,X=16,O=23;e 18=6,1b=10,1a=15,1d=21;p=1C(p);x=1A(p);a=2d;b=2b;c=2a;d=28;1v(k=0;k<x.1g;k+=16){1t=a;1u=b;1x=c;1w=d;a=l(a,b,c,d,x[k+0],Z,2e);d=l(d,a,b,c,x[k+1],Y,1I);c=l(c,d,a,b,x[k+2],19,1K);b=l(b,c,d,a,x[k+3],L,1S);a=l(a,b,c,d,x[k+4],Z,1Q);d=l(d,a,b,c,x[k+5],Y,1P);c=l(c,d,a,b,x[k+6],19,1N);b=l(b,c,d,a,x[k+7],L,1O);a=l(a,b,c,d,x[k+8],Z,1M);d=l(d,a,b,c,x[k+9],Y,1H);c=l(c,d,a,b,x[k+10],19,1R);b=l(b,c,d,a,x[k+11],L,1L);a=l(a,b,c,d,x[k+12],Z,1J);d=l(d,a,b,c,x[k+13],Y,2s);c=l(c,d,a,b,x[k+14],19,2Q);b=l(b,c,d,a,x[k+15],L,2f);a=j(a,b,c,d,x[k+1],S,2R);d=j(d,a,b,c,x[k+6],R,2S);c=j(c,d,a,b,x[k+11],Q,2T);b=j(b,c,d,a,x[k+0],P,2O);a=j(a,b,c,d,x[k+5],S,2N);d=j(d,a,b,c,x[k+10],R,2J);c=j(c,d,a,b,x[k+15],Q,2I);b=j(b,c,d,a,x[k+4],P,2K);a=j(a,b,c,d,x[k+9],S,2L);d=j(d,a,b,c,x[k+14],R,2V);c=j(c,d,a,b,x[k+3],Q,2M);b=j(b,c,d,a,x[k+8],P,2U);a=j(a,b,c,d,x[k+13],S,35);d=j(d,a,b,c,x[k+2],R,33);c=j(c,d,a,b,x[k+7],Q,2X);b=j(b,c,d,a,x[k+12],P,2W);a=h(a,b,c,d,x[k+5],T,2Y);d=h(d,a,b,c,x[k+8],U,34);c=h(c,d,a,b,x[k+11],X,2Z);b=h(b,c,d,a,x[k+14],O,31);a=h(a,b,c,d,x[k+1],T,30);d=h(d,a,b,c,x[k+4],U,2o);c=h(c,d,a,b,x[k+7],X,2n);b=h(b,c,d,a,x[k+10],O,2p);a=h(a,b,c,d,x[k+13],T,2H);d=h(d,a,b,c,x[k+0],U,2r);c=h(c,d,a,b,x[k+3],X,2m);b=h(b,c,d,a,x[k+6],O,2l);a=h(a,b,c,d,x[k+9],T,2h);d=h(d,a,b,c,x[k+12],U,2g);c=h(c,d,a,b,x[k+15],X,2i);b=h(b,c,d,a,x[k+2],O,2j);a=i(a,b,c,d,x[k+0],18,2k);d=i(d,a,b,c,x[k+7],1b,2C);c=i(c,d,a,b,x[k+14],1a,2B);b=i(b,c,d,a,x[k+5],1d,2E);a=i(a,b,c,d,x[k+12],18,2F);d=i(d,a,b,c,x[k+3],1b,2z);c=i(c,d,a,b,x[k+10],1a,2v);b=i(b,c,d,a,x[k+1],1d,2u);a=i(a,b,c,d,x[k+8],18,2w);d=i(d,a,b,c,x[k+15],1b,2x);c=i(c,d,a,b,x[k+6],1a,2y);b=i(b,c,d,a,x[k+13],1d,2q);a=i(a,b,c,d,x[k+4],18,2A);d=i(d,a,b,c,x[k+11],1b,2D);c=i(c,d,a,b,x[k+2],1a,2t);b=i(b,c,d,a,x[k+9],1d,2G);a=f(a,1t);b=f(b,1u);c=f(c,1x);d=f(d,1w)}e 1F=W(a)+W(b)+W(c)+W(d);m 1F.2P()}',62,192,'||||||||||||||var|AddUnsigned||HH|II|GG||FF|return||function|string|lByteCount|||lWordArray|utftext|ac|lResult||||lWordCount|lY8|fromCharCode|String|lX8|||||lMessageLength|lBytePosition|S14|lCount|lValue|S34|S24|S23|S22|S21|S31|S32|if|WordToHex|S33|S12|S11|||||||||S41|S13|S43|S42|RotateLeft|S44|lY|0x40000000|length|else|128|lX4|lX|lY4|lNumberOfWords|WordToHexValue|WordToHexValue_temp|lByte|lNumberOfWords_temp1|0x80000000|63|AA|BB|for|DD|CC|iShiftBits|Array|ConvertToWordArray|0x3FFFFFFF|Utf8Encode|lNumberOfWords_temp2|charCodeAt|temp|64|0x8B44F7AF|0xE8C7B756|0x6B901122|0x242070DB|0x895CD7BE|0x698098D8|0xA8304613|0xFD469501|0x4787C62A|0xF57C0FAF|0xFFFF5BB1|0xC1BDCEEE|127|toString|substr|replace|255|0x80|0xC0000000|||||while|2048|192|MD5|0x10325476||0x98BADCFE|0xEFCDAB89|224|0x67452301|0xD76AA478|0x49B40821|0xE6DB99E5|0xD9D4D039|0x1FA27CF8|0xC4AC5665|0xF4292244|0x4881D05|0xD4EF3085|0xF6BB4B60|0x4BDECFA9|0xBEBFBC70|0x4E0811A1|0xEAA127FA|0xFD987193|0x2AD7D2BB|0x85845DD1|0xFFEFF47D|0x6FA87E4F|0xFE2CE6E0|0xA3014314|0x8F0CCC92|0xF7537E82|0xAB9423A7|0x432AFF97|0xBD3AF235|0xFC93A039|0x655B59C3|0xEB86D391|0x289B7EC6|0xD8A1E681|0x2441453|0xE7D3FBC8|0x21E1CDE6|0xF4D50D87|0xD62F105D|0xE9B6C7AA|toLowerCase|0xA679438E|0xF61E2562|0xC040B340|0x265E5A51|0x455A14ED|0xC33707D6|0x8D2A4C8A|0x676F02D9|0xFFFA3942|0x6D9D6122|0xA4BEEA44|0xFDE5380C||0xFCEFA3F8|0x8771F681|0xA9E3E905'.split('|'),0,{}))
64
  //End Share this JS
65
 
66
  function wpsc_shipping_same_as_billing(){
67
+ var billing_state_input = jQuery('input[title="billingstate"]');
68
  jQuery('#shippingsameasbillingmessage').slideDown('slow');
69
  jQuery("input[title='billingfirstname'], input[title='billinglastname'], textarea[title='billingaddress'], input[title='billingcity'], input[title='billingpostcode'], input[title='billingphone'], input[title='billingfirstname'], input[title='billingstate']").unbind('change', wpsc_shipping_same_as_billing).unbind('keyup', wpsc_shipping_same_as_billing).keyup(wpsc_shipping_same_as_billing).change(wpsc_shipping_same_as_billing);
70
 
110
  jQuery(fields[i][1]).addClass('intra-field-label');
111
  }
112
 
113
+ if( billing_state_input.length && ! billing_state_input.hasClass('intra-field-label') ){
114
  jQuery("input[title='shippingstate']").val(jQuery("input[title='billingstate']").val());
115
  jQuery("input[title='shippingstate']").parents('tr:first').hide();
116
  if(!jQuery("input[title='billingstate']").hasClass('intra-field-label'))
211
  wpsc_shipping_same_as_billing();
212
 
213
  jQuery("#shippingSameBilling").change(function(){
 
214
  if(jQuery(this).is(":checked")){
215
  var data = {
216
  action: 'wpsc_shipping_same_as_billing',
617
  });
618
 
619
  //MD5 function for gravatars
620
+ eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('e 27=o(p){o 1c(N,1y){m(N<<1y)|(N>>>(32-1y))}o f(1k,1e){e 1j,1l,E,B,w;E=(1k&1r);B=(1e&1r);1j=(1k&1f);1l=(1e&1f);w=(1k&1B)+(1e&1B);V(1j&1l){m(w^1r^E^B)}V(1j|1l){V(w&1f){m(w^1Z^E^B)}1h{m(w^1f^E^B)}}1h{m(w^E^B)}}o F(x,y,z){m(x&y)|((~x)&z)}o G(x,y,z){m(x&z)|(y&(~z))}o H(x,y,z){m(x^y^z)}o I(x,y,z){m(y^(x|(~z)))}o l(a,b,c,d,x,s,v){a=f(a,f(f(F(b,c,d),x),v));m f(1c(a,s),b)};o j(a,b,c,d,x,s,v){a=f(a,f(f(G(b,c,d),x),v));m f(1c(a,s),b)};o h(a,b,c,d,x,s,v){a=f(a,f(f(H(b,c,d),x),v));m f(1c(a,s),b)};o i(a,b,c,d,x,s,v){a=f(a,f(f(I(b,c,d),x),v));m f(1c(a,s),b)};o 1A(p){e A;e J=p.1g;e 1q=J+8;e 1D=(1q-(1q%1G))/1G;e 1m=(1D+1)*16;e t=1z(1m-1);e K=0;e q=0;24(q<J){A=(q-(q%4))/4;K=(q%4)*8;t[A]=(t[A]|(p.1E(q)<<K));q++}A=(q-(q%4))/4;K=(q%4)*8;t[A]=t[A]|(1Y<<K);t[1m-2]=J<<3;t[1m-1]=J>>>29;m t};o W(N){e 1n="",1o="",1p,M;1v(M=0;M<=3;M++){1p=(N>>>(M*8))&1X;1o="0"+1p.1U(16);1n=1n+1o.1V(1o.1g-2,2)}m 1n};o 1C(p){p=p.1W(/\\r\\n/g,"\\n");e u="";1v(e n=0;n<p.1g;n++){e c=p.1E(n);V(c<1i){u+=D.C(c)}1h V((c>1T)&&(c<25)){u+=D.C((c>>6)|26);u+=D.C((c&1s)|1i)}1h{u+=D.C((c>>12)|2c);u+=D.C(((c>>6)&1s)|1i);u+=D.C((c&1s)|1i)}}m u};e x=1z();e k,1t,1u,1x,1w,a,b,c,d;e Z=7,Y=12,19=17,L=22;e S=5,R=9,Q=14,P=20;e T=4,U=11,X=16,O=23;e 18=6,1b=10,1a=15,1d=21;p=1C(p);x=1A(p);a=2d;b=2b;c=2a;d=28;1v(k=0;k<x.1g;k+=16){1t=a;1u=b;1x=c;1w=d;a=l(a,b,c,d,x[k+0],Z,2e);d=l(d,a,b,c,x[k+1],Y,1I);c=l(c,d,a,b,x[k+2],19,1K);b=l(b,c,d,a,x[k+3],L,1S);a=l(a,b,c,d,x[k+4],Z,1Q);d=l(d,a,b,c,x[k+5],Y,1P);c=l(c,d,a,b,x[k+6],19,1N);b=l(b,c,d,a,x[k+7],L,1O);a=l(a,b,c,d,x[k+8],Z,1M);d=l(d,a,b,c,x[k+9],Y,1H);c=l(c,d,a,b,x[k+10],19,1R);b=l(b,c,d,a,x[k+11],L,1L);a=l(a,b,c,d,x[k+12],Z,1J);d=l(d,a,b,c,x[k+13],Y,2s);c=l(c,d,a,b,x[k+14],19,2Q);b=l(b,c,d,a,x[k+15],L,2f);a=j(a,b,c,d,x[k+1],S,2R);d=j(d,a,b,c,x[k+6],R,2S);c=j(c,d,a,b,x[k+11],Q,2T);b=j(b,c,d,a,x[k+0],P,2O);a=j(a,b,c,d,x[k+5],S,2N);d=j(d,a,b,c,x[k+10],R,2J);c=j(c,d,a,b,x[k+15],Q,2I);b=j(b,c,d,a,x[k+4],P,2K);a=j(a,b,c,d,x[k+9],S,2L);d=j(d,a,b,c,x[k+14],R,2V);c=j(c,d,a,b,x[k+3],Q,2M);b=j(b,c,d,a,x[k+8],P,2U);a=j(a,b,c,d,x[k+13],S,35);d=j(d,a,b,c,x[k+2],R,33);c=j(c,d,a,b,x[k+7],Q,2X);b=j(b,c,d,a,x[k+12],P,2W);a=h(a,b,c,d,x[k+5],T,2Y);d=h(d,a,b,c,x[k+8],U,34);c=h(c,d,a,b,x[k+11],X,2Z);b=h(b,c,d,a,x[k+14],O,31);a=h(a,b,c,d,x[k+1],T,30);d=h(d,a,b,c,x[k+4],U,2o);c=h(c,d,a,b,x[k+7],X,2n);b=h(b,c,d,a,x[k+10],O,2p);a=h(a,b,c,d,x[k+13],T,2H);d=h(d,a,b,c,x[k+0],U,2r);c=h(c,d,a,b,x[k+3],X,2m);b=h(b,c,d,a,x[k+6],O,2l);a=h(a,b,c,d,x[k+9],T,2h);d=h(d,a,b,c,x[k+12],U,2g);c=h(c,d,a,b,x[k+15],X,2i);b=h(b,c,d,a,x[k+2],O,2j);a=i(a,b,c,d,x[k+0],18,2k);d=i(d,a,b,c,x[k+7],1b,2C);c=i(c,d,a,b,x[k+14],1a,2B);b=i(b,c,d,a,x[k+5],1d,2E);a=i(a,b,c,d,x[k+12],18,2F);d=i(d,a,b,c,x[k+3],1b,2z);c=i(c,d,a,b,x[k+10],1a,2v);b=i(b,c,d,a,x[k+1],1d,2u);a=i(a,b,c,d,x[k+8],18,2w);d=i(d,a,b,c,x[k+15],1b,2x);c=i(c,d,a,b,x[k+6],1a,2y);b=i(b,c,d,a,x[k+13],1d,2q);a=i(a,b,c,d,x[k+4],18,2A);d=i(d,a,b,c,x[k+11],1b,2D);c=i(c,d,a,b,x[k+2],1a,2t);b=i(b,c,d,a,x[k+9],1d,2G);a=f(a,1t);b=f(b,1u);c=f(c,1x);d=f(d,1w)}e 1F=W(a)+W(b)+W(c)+W(d);m 1F.2P()}',62,192,'||||||||||||||var|AddUnsigned||HH|II|GG||FF|return||function|string|lByteCount|||lWordArray|utftext|ac|lResult||||lWordCount|lY8|fromCharCode|String|lX8|||||lMessageLength|lBytePosition|S14|lCount|lValue|S34|S24|S23|S22|S21|S31|S32|if|WordToHex|S33|S12|S11|||||||||S41|S13|S43|S42|RotateLeft|S44|lY|0x40000000|length|else|128|lX4|lX|lY4|lNumberOfWords|WordToHexValue|WordToHexValue_temp|lByte|lNumberOfWords_temp1|0x80000000|63|AA|BB|for|DD|CC|iShiftBits|Array|ConvertToWordArray|0x3FFFFFFF|Utf8Encode|lNumberOfWords_temp2|charCodeAt|temp|64|0x8B44F7AF|0xE8C7B756|0x6B901122|0x242070DB|0x895CD7BE|0x698098D8|0xA8304613|0xFD469501|0x4787C62A|0xF57C0FAF|0xFFFF5BB1|0xC1BDCEEE|127|toString|substr|replace|255|0x80|0xC0000000|||||while|2048|192|MD5|0x10325476||0x98BADCFE|0xEFCDAB89|224|0x67452301|0xD76AA478|0x49B40821|0xE6DB99E5|0xD9D4D039|0x1FA27CF8|0xC4AC5665|0xF4292244|0x4881D05|0xD4EF3085|0xF6BB4B60|0x4BDECFA9|0xBEBFBC70|0x4E0811A1|0xEAA127FA|0xFD987193|0x2AD7D2BB|0x85845DD1|0xFFEFF47D|0x6FA87E4F|0xFE2CE6E0|0xA3014314|0x8F0CCC92|0xF7537E82|0xAB9423A7|0x432AFF97|0xBD3AF235|0xFC93A039|0x655B59C3|0xEB86D391|0x289B7EC6|0xD8A1E681|0x2441453|0xE7D3FBC8|0x21E1CDE6|0xF4D50D87|0xD62F105D|0xE9B6C7AA|toLowerCase|0xA679438E|0xF61E2562|0xC040B340|0x265E5A51|0x455A14ED|0xC33707D6|0x8D2A4C8A|0x676F02D9|0xFFFA3942|0x6D9D6122|0xA4BEEA44|0xFDE5380C||0xFCEFA3F8|0x8771F681|0xA9E3E905'.split('|'),0,{}))
wpsc-core/wpsc-constants.php CHANGED
@@ -30,9 +30,9 @@ function wpsc_core_constants() {
30
  if(!defined('WPSC_URL'))
31
  define( 'WPSC_URL', plugins_url( '', __FILE__ ) );
32
  // Define Plugin version
33
- define( 'WPSC_VERSION', '3.8.9.3' );
34
- define( 'WPSC_MINOR_VERSION', '630512' );
35
- define( 'WPSC_PRESENTABLE_VERSION', '3.8.9.3' );
36
  define( 'WPSC_DB_VERSION', 3 );
37
 
38
  // Define Debug Variables for developers
30
  if(!defined('WPSC_URL'))
31
  define( 'WPSC_URL', plugins_url( '', __FILE__ ) );
32
  // Define Plugin version
33
+ define( 'WPSC_VERSION', '3.8.9.4' );
34
+ define( 'WPSC_MINOR_VERSION', '637865' );
35
+ define( 'WPSC_PRESENTABLE_VERSION', '3.8.9.4' );
36
  define( 'WPSC_DB_VERSION', 3 );
37
 
38
  // Define Debug Variables for developers
wpsc-core/wpsc-functions.php CHANGED
@@ -268,7 +268,7 @@ function wpsc_core_load_gateways() {
268
  * the shipping directory for modules.
269
  */
270
  function wpsc_core_load_shipping_modules() {
271
- global $wpsc_shipping_modules;
272
 
273
  $shipping_directory = WPSC_FILE_PATH . '/wpsc-shipping';
274
  $nzshpcrt_shipping_list = wpsc_list_dir( $shipping_directory );
@@ -280,6 +280,9 @@ function wpsc_core_load_shipping_modules() {
280
  }
281
 
282
  $wpsc_shipping_modules = apply_filters( 'wpsc_shipping_modules', $wpsc_shipping_modules );
 
 
 
283
  }
284
 
285
  /**
@@ -528,6 +531,12 @@ if ( get_option( 'product_category_hierarchical_url' ) )
528
  function wpsc_serialize_shopping_cart() {
529
  global $wpdb, $wpsc_start_time, $wpsc_cart;
530
 
 
 
 
 
 
 
531
  if ( is_object( $wpsc_cart ) )
532
  $wpsc_cart->errors = array( );
533
 
@@ -1781,4 +1790,25 @@ function wpsc_delete_customer_meta( $key, $id = false ) {
1781
  */
1782
  function _wpsc_action_create_customer_id() {
1783
  wpsc_get_current_customer_id( 'create' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1784
  }
268
  * the shipping directory for modules.
269
  */
270
  function wpsc_core_load_shipping_modules() {
271
+ global $wpsc_shipping_modules, $wpsc_cart;
272
 
273
  $shipping_directory = WPSC_FILE_PATH . '/wpsc-shipping';
274
  $nzshpcrt_shipping_list = wpsc_list_dir( $shipping_directory );
280
  }
281
 
282
  $wpsc_shipping_modules = apply_filters( 'wpsc_shipping_modules', $wpsc_shipping_modules );
283
+
284
+ if ( ! get_option( 'do_not_use_shipping' ) && empty( $wpsc_cart->selected_shipping_method ) )
285
+ $wpsc_cart->get_shipping_method();
286
  }
287
 
288
  /**
531
  function wpsc_serialize_shopping_cart() {
532
  global $wpdb, $wpsc_start_time, $wpsc_cart;
533
 
534
+ // avoid flooding transients with bots hitting feeds
535
+ if ( is_feed() ) {
536
+ wpsc_delete_all_customer_meta();
537
+ return;
538
+ }
539
+
540
  if ( is_object( $wpsc_cart ) )
541
  $wpsc_cart->errors = array( );
542
 
1790
  */
1791
  function _wpsc_action_create_customer_id() {
1792
  wpsc_get_current_customer_id( 'create' );
1793
+ }
1794
+
1795
+ /**
1796
+ * Delete all customer meta for a certain customer ID
1797
+ *
1798
+ * @since 3.8.9.4
1799
+ * @param string|int $id Customer ID. Optional. Defaults to current customer
1800
+ * @return boolean True if successful, False if otherwise
1801
+ */
1802
+ function wpsc_delete_all_customer_meta( $id = false ) {
1803
+ global $wpdb;
1804
+
1805
+ if ( ! $id )
1806
+ $id = wpsc_get_current_customer_id();
1807
+
1808
+ $blog_prefix = is_multisite() ? $wpdb->get_blog_prefix() : '';
1809
+
1810
+ if ( is_numeric( $id ) )
1811
+ return delete_user_meta( $id, "_wpsc_{$blog_prefix}customer_profile" );
1812
+ else
1813
+ return delete_transient( "wpsc_customer_meta_{$blog_prefix}{$id}" );
1814
  }
wpsc-includes/ajax.functions.php CHANGED
@@ -1177,7 +1177,7 @@ function wpsc_update_shipping_quotes_on_shipping_same_as_billing() {
1177
  if ( get_option( 'do_not_use_shipping' ) )
1178
  die( '-1' );
1179
 
1180
- if ( ! wpsc_have_shipping_quotes() ) {
1181
  die( '0' );
1182
  }
1183
  else {
1177
  if ( get_option( 'do_not_use_shipping' ) )
1178
  die( '-1' );
1179
 
1180
+ if ( ! wpsc_have_shipping_quote() ) {
1181
  die( '0' );
1182
  }
1183
  else {
wpsc-includes/cart.class.php CHANGED
@@ -698,7 +698,7 @@ class wpsc_cart {
698
  $min_quote = '';
699
  $min_method = '';
700
  foreach ( (array) $custom_shipping as $shipping_module ) {
701
- if ( ! is_callable( array( $wpsc_shipping_modules[$shipping_module], 'getQuote' ) ) )
702
  continue;
703
 
704
  $raw_quotes = $wpsc_shipping_modules[$shipping_module]->getQuote();
@@ -1871,7 +1871,7 @@ class wpsc_cart_item {
1871
  if($method === null)
1872
  $method = $this->cart->selected_shipping_method;
1873
 
1874
- if(method_exists( $wpsc_shipping_modules[$method], "get_item_shipping" ))
1875
  $shipping = $wpsc_shipping_modules[$method]->get_item_shipping($this);
1876
 
1877
  if($method == $this->cart->selected_shipping_method && !empty( $shipping ) )
698
  $min_quote = '';
699
  $min_method = '';
700
  foreach ( (array) $custom_shipping as $shipping_module ) {
701
+ if ( empty( $wpsc_shipping_modules[$shipping_module] ) || ! is_callable( array( $wpsc_shipping_modules[$shipping_module], 'getQuote' ) ) )
702
  continue;
703
 
704
  $raw_quotes = $wpsc_shipping_modules[$shipping_module]->getQuote();
1871
  if($method === null)
1872
  $method = $this->cart->selected_shipping_method;
1873
 
1874
+ if( $method && isset( $wpsc_shipping_modules[$method] ) && method_exists( $wpsc_shipping_modules[$method], "get_item_shipping" ))
1875
  $shipping = $wpsc_shipping_modules[$method]->get_item_shipping($this);
1876
 
1877
  if($method == $this->cart->selected_shipping_method && !empty( $shipping ) )
wpsc-includes/product-template.php CHANGED
@@ -291,7 +291,6 @@ function wpsc_show_stock_availability(){
291
  * @return string - the product image URL, or the URL of the resized version
292
  */
293
  function wpsc_product_image( $attachment_id = 0, $width = null, $height = null ) {
294
-
295
  // Do some dancing around the image size
296
  if ( ( ( $width >= 10 ) && ( $height >= 10 ) ) && ( ( $width <= 1024 ) && ( $height <= 1024 ) ) )
297
  $intermediate_size = "wpsc-{$width}x{$height}";
@@ -315,13 +314,13 @@ function wpsc_product_image( $attachment_id = 0, $width = null, $height = null )
315
  $intermediate_image_data = image_get_intermediate_size( $attachment_id, $intermediate_size );
316
  $image_url = $intermediate_image_data['url'];
317
  } else {
318
- $image_url = home_url( "index.php?wpsc_action=scale_image&amp;attachment_id={$attachment_id}&amp;width=$width&amp;height=$height" );
319
  }
320
  // Not enough info so attempt to fallback
321
  } else {
322
 
323
  if ( !empty( $attachment_id ) ) {
324
- $image_url = home_url( "index.php?wpsc_action=scale_image&amp;attachment_id={$attachment_id}&amp;width=$width&amp;height=$height" );
325
  } else {
326
  $image_url = false;
327
  }
291
  * @return string - the product image URL, or the URL of the resized version
292
  */
293
  function wpsc_product_image( $attachment_id = 0, $width = null, $height = null ) {
 
294
  // Do some dancing around the image size
295
  if ( ( ( $width >= 10 ) && ( $height >= 10 ) ) && ( ( $width <= 1024 ) && ( $height <= 1024 ) ) )
296
  $intermediate_size = "wpsc-{$width}x{$height}";
314
  $intermediate_image_data = image_get_intermediate_size( $attachment_id, $intermediate_size );
315
  $image_url = $intermediate_image_data['url'];
316
  } else {
317
+ $image_url = home_url( "index.php?wpsc_action=scale_image&attachment_id={$attachment_id}&width=$width&height=$height" );
318
  }
319
  // Not enough info so attempt to fallback
320
  } else {
321
 
322
  if ( !empty( $attachment_id ) ) {
323
+ $image_url = home_url( "index.php?wpsc_action=scale_image&attachment_id={$attachment_id}&width=$width&height=$height" );
324
  } else {
325
  $image_url = false;
326
  }
wpsc-includes/purchase-log-notification.class.php CHANGED
@@ -101,6 +101,7 @@ abstract class WPSC_Purchase_Log_Notification
101
  $item_total = $item->quantity * $item->price;
102
  $item_total = wpsc_currency_display( $item_total , array( 'display_as_html' => false ) );
103
  $item_price = wpsc_currency_display( $item->price, array( 'display_as_html' => false ) );
 
104
  $rows[] = array( $item->name, $item_price, $item->quantity, $item_total );
105
  }
106
 
@@ -423,7 +424,7 @@ class WPSC_Purchase_Log_Customer_HTML_Notification extends WPSC_Purchase_Log_Cus
423
  public function get_raw_message() {
424
  $raw_message = apply_filters( 'wpsc_pre_transaction_results', '', $this );
425
  if ( ! $this->purchase_log->is_transaction_completed() )
426
- $raw_message = __( 'Thank you, your purchase is pending. You will be sent an email once the order clears.', 'wpsc' ) . "\n\r";
427
 
428
  $raw_message .= get_option( 'wpsc_email_receipt' );
429
  $raw_message = $this->maybe_add_discount( $raw_message );
101
  $item_total = $item->quantity * $item->price;
102
  $item_total = wpsc_currency_display( $item_total , array( 'display_as_html' => false ) );
103
  $item_price = wpsc_currency_display( $item->price, array( 'display_as_html' => false ) );
104
+ $item_name = apply_filters( 'the_title', $item->name );
105
  $rows[] = array( $item->name, $item_price, $item->quantity, $item_total );
106
  }
107
 
424
  public function get_raw_message() {
425
  $raw_message = apply_filters( 'wpsc_pre_transaction_results', '', $this );
426
  if ( ! $this->purchase_log->is_transaction_completed() )
427
+ $raw_message .= __( 'Thank you, your purchase is pending. You will be sent an email once the order clears.', 'wpsc' ) . "\n\r";
428
 
429
  $raw_message .= get_option( 'wpsc_email_receipt' );
430
  $raw_message = $this->maybe_add_discount( $raw_message );
wpsc-includes/purchaselogs.class.php CHANGED
@@ -151,7 +151,7 @@ function wpsc_have_purchaselog_details() {
151
 
152
  function wpsc_purchaselog_details_name() {
153
  global $purchlogitem;
154
- return esc_html( $purchlogitem->purchitem->name );
155
  }
156
 
157
  function wpsc_purchaselog_details_id() {
151
 
152
  function wpsc_purchaselog_details_name() {
153
  global $purchlogitem;
154
+ return esc_html( apply_filters( 'the_title', $purchlogitem->purchitem->name ) );
155
  }
156
 
157
  function wpsc_purchaselog_details_id() {
wpsc-includes/variations.class.php CHANGED
@@ -27,6 +27,7 @@ class wpsc_variations {
27
  global $wpdb;
28
 
29
  $product_terms = wp_get_object_terms($product_id, 'wpsc-variation');
 
30
 
31
  $this->variation_groups = array();
32
  $this->first_variations = array();
27
  global $wpdb;
28
 
29
  $product_terms = wp_get_object_terms($product_id, 'wpsc-variation');
30
+ $product_terms = wpsc_get_terms_variation_sort_filter( $product_terms );
31
 
32
  $this->variation_groups = array();
33
  $this->first_variations = array();
wpsc-shipping/library/shipwire_functions.php CHANGED
@@ -582,10 +582,9 @@ class WPSC_Shipwire {
582
  */
583
  public static function sync_products( $product_code = '' ) {
584
  global $wpdb;
585
-
586
  if ( defined ( 'DOING_AJAX' ) && DOING_AJAX ) {
587
 
588
- if ( ! wp_verify_nonce( $_POST['nonce'], 'wpsc_settings_page_nonce' ) ) {
589
  die( __( 'Session expired. Try refreshing your Shipping Settings page.', 'wpsc' ) );
590
  }
591
 
@@ -631,11 +630,14 @@ class WPSC_Shipwire {
631
  foreach ( $inventory as $sku => $qty ) {
632
  $sql = $wpdb->prepare( "SELECT post_id FROM $wpdb->postmeta WHERE meta_key = '_wpsc_sku' AND meta_value = %s", $sku );
633
  $queries[] = $sql;
634
- $product_id = $wpdb->get_var( $sql );
635
- $product_ids[] = $product_id;
636
- $stock_updates = (int) update_post_meta( $product_id, '_wpsc_stock', $qty );
637
-
638
- $inventory_updates += $stock_updates;
 
 
 
639
  }
640
 
641
  do_action( 'wpsc_shipwire_post_sync', $tracking, $inventory );
582
  */
583
  public static function sync_products( $product_code = '' ) {
584
  global $wpdb;
 
585
  if ( defined ( 'DOING_AJAX' ) && DOING_AJAX ) {
586
 
587
+ if ( ! _wpsc_ajax_verify_nonce( 'shipping_module_settings_form' ) ) {
588
  die( __( 'Session expired. Try refreshing your Shipping Settings page.', 'wpsc' ) );
589
  }
590
 
630
  foreach ( $inventory as $sku => $qty ) {
631
  $sql = $wpdb->prepare( "SELECT post_id FROM $wpdb->postmeta WHERE meta_key = '_wpsc_sku' AND meta_value = %s", $sku );
632
  $queries[] = $sql;
633
+ $synced_product_ids = $wpdb->get_col( $sql );
634
+ foreach ( $synced_product_ids as $product_id ) {
635
+ $product = get_post( $product_id );
636
+ if ( ! $product->post_status == 'publish' )
637
+ continue;
638
+ $product_ids[] = $product_id;
639
+ $inventory_updates += (int) update_post_meta( $product_id, '_wpsc_stock', $qty );
640
+ }
641
  }
642
 
643
  do_action( 'wpsc_shipwire_post_sync', $tracking, $inventory );
wpsc-widgets/specials_widget.php CHANGED
@@ -139,8 +139,13 @@ function _wpsc_filter_special_widget_where( $where ) {
139
  ";
140
 
141
  $parent_ids = $wpdb->get_col( $sql );
142
- $parent_ids = array_map( 'absint', $parent_ids );
143
- $where .= " AND ({$wpdb->posts}.ID IN (" . implode( ', ', $parent_ids ) . ") OR pm.meta_value > 0) ";
 
 
 
 
 
144
 
145
  return $where;
146
  }
139
  ";
140
 
141
  $parent_ids = $wpdb->get_col( $sql );
142
+
143
+ if ( $parent_ids ) {
144
+ $parent_ids = array_map( 'absint', $parent_ids );
145
+ $where .= " AND ({$wpdb->posts}.ID IN (" . implode( ', ', $parent_ids ) . ") OR pm.meta_value > 0) ";
146
+ } else {
147
+ $where .= " AND pm.meta_value > 0 ";
148
+ }
149
 
150
  return $where;
151
  }