Version Description
- New: Support for g:availability to Google Merchant Centre feed. Props bbaskets & longercat
- Fix: Admin product page sorting by column was not working.
- Fix: Call to undefined function wpsc_clear_stock_claims().
- Fix: Checkbox and Radio buttons have unexpected issues in checkout.
- Fix: Checkout field options' values are mutilated before getting inserted into the database.
- Fix: PayPal standard IPN fails if data used to validate the IPN POST contains ' or ".
- Fix: Price incorrectly updated when multiple products with variations exist on the same page.
- Fix: Security vulnerability.
- Fix: ShareThis integration does not properl respect HTTPS connections.
- Fix: The Terms and conditions checkbox on the checkout page should have a required field asterisk, just like all other required checkout fields do.
- Fix: Wrong login URL for [userlog] page.
- Fix: Zero shipping price doesn't work in flatrate.php.
- Fix: invalid HTML on checkout page for default theme.
- Fix: wpsc_coupons::uses_coupons() needs optimization.
Download this release
Release Info
| Developer | garyc40 |
| Plugin | |
| Version | 3.8.7.2 |
| Comparing to | |
| See all releases | |
Code changes from version 3.8.7.1 to 3.8.7.2
- readme.txt +18 -2
- wp-shopping-cart.php +1 -1
- wpsc-admin/admin.php +21 -18
- wpsc-admin/ajax-and-init.php +1 -1
- wpsc-admin/display-items.page.php +63 -27
- wpsc-admin/display-sales-logs.php +2 -2
- wpsc-admin/includes/save-data.functions.php +1 -1
- wpsc-admin/includes/settings-pages/admin.php +1 -1
- wpsc-core/js/wp-e-commerce.js +13 -10
- wpsc-core/wpsc-constants.php +3 -3
- wpsc-core/wpsc-includes.php +1 -2
- wpsc-includes/checkout.class.php +1 -1
- wpsc-includes/coupons.class.php +2 -6
- wpsc-includes/cron.php +1 -1
- wpsc-includes/meta.functions.php +1 -1
- wpsc-includes/productfeed.php +16 -1
- wpsc-includes/purchaselogs.class.php +1 -2
- wpsc-includes/theme.functions.php +6 -7
- wpsc-languages/EN_en.php +1 -1
- wpsc-merchants/paypal-express.merchant.php +2 -2
- wpsc-merchants/paypal-pro.merchant.php +2 -2
- wpsc-merchants/paypal-standard.merchant.php +2 -2
- wpsc-shipping/australiapost.php +0 -16
- wpsc-shipping/flatrate.php +1 -1
- wpsc-shipping/ups_20.php +4 -4
- wpsc-theme/wpsc-shopping_cart_page.php +2 -2
- wpsc-theme/wpsc-user-log.php +1 -1
readme.txt
CHANGED
|
@@ -4,7 +4,7 @@ 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.0
|
| 6 |
Tested up to: 3.2.1
|
| 7 |
-
Stable tag: 3.8.7.
|
| 8 |
|
| 9 |
WP e-Commerce is a free WordPress Shopping Cart Plugin that lets customers buy your products, services and digital downloads online.
|
| 10 |
|
|
@@ -156,6 +156,22 @@ After upgrading from earlier versions look for link "Update Store". This will up
|
|
| 156 |
|
| 157 |
|
| 158 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 159 |
= 3.8.7.1 =
|
| 160 |
* Fix: Fancy notifications not being displayed on single product page.
|
| 161 |
* Fix: Sale and normal prices are switched around.
|
|
@@ -399,4 +415,4 @@ Advanced users can edit the CSS (and do just about anything). Not so advanced us
|
|
| 399 |
== Upgrade Notice ==
|
| 400 |
|
| 401 |
= 3.8.1 =
|
| 402 |
-
This version addresses several urgent issues when upgrading from 3.7.x to 3.8.
|
| 4 |
Tags: e-commerce, wp-e-commerce, shop, cart, paypal, authorize, stock control, ecommerce, shipping, tax
|
| 5 |
Requires at least: 3.0
|
| 6 |
Tested up to: 3.2.1
|
| 7 |
+
Stable tag: 3.8.7.2
|
| 8 |
|
| 9 |
WP e-Commerce is a free WordPress Shopping Cart Plugin that lets customers buy your products, services and digital downloads online.
|
| 10 |
|
| 156 |
|
| 157 |
|
| 158 |
== Changelog ==
|
| 159 |
+
= 3.8.7.2 =
|
| 160 |
+
* New: Support for g:availability to Google Merchant Centre feed. Props bbaskets & longercat
|
| 161 |
+
* Fix: Admin product page sorting by column was not working.
|
| 162 |
+
* Fix: Call to undefined function wpsc_clear_stock_claims().
|
| 163 |
+
* Fix: Checkbox and Radio buttons have unexpected issues in checkout.
|
| 164 |
+
* Fix: Checkout field options' values are mutilated before getting inserted into the database.
|
| 165 |
+
* Fix: PayPal standard IPN fails if data used to validate the IPN POST contains ' or ".
|
| 166 |
+
* Fix: Price incorrectly updated when multiple products with variations exist on the same page.
|
| 167 |
+
* Fix: Security vulnerability.
|
| 168 |
+
* Fix: ShareThis integration does not properl respect HTTPS connections.
|
| 169 |
+
* Fix: The Terms and conditions checkbox on the checkout page should have a required field asterisk, just like all other required checkout fields do.
|
| 170 |
+
* Fix: Wrong login URL for [userlog] page.
|
| 171 |
+
* Fix: Zero shipping price doesn't work in flatrate.php.
|
| 172 |
+
* Fix: invalid HTML on checkout page for default theme.
|
| 173 |
+
* Fix: wpsc_coupons::uses_coupons() needs optimization.
|
| 174 |
+
|
| 175 |
= 3.8.7.1 =
|
| 176 |
* Fix: Fancy notifications not being displayed on single product page.
|
| 177 |
* Fix: Sale and normal prices are switched around.
|
| 415 |
== Upgrade Notice ==
|
| 416 |
|
| 417 |
= 3.8.1 =
|
| 418 |
+
This version addresses several urgent issues when upgrading from 3.7.x to 3.8.
|
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.7.
|
| 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.7.2
|
| 7 |
* Author: Instinct Entertainment
|
| 8 |
* Author URI: http://getshopped.org/
|
| 9 |
**/
|
wpsc-admin/admin.php
CHANGED
|
@@ -25,7 +25,7 @@ require_once( WPSC_FILE_PATH . '/wpsc-admin/display-sales-logs.php' );
|
|
| 25 |
if ( ( isset( $_SESSION['wpsc_activate_debug_page'] ) && ( $_SESSION['wpsc_activate_debug_page'] == true ) ) || ( defined( 'WPSC_ADD_DEBUG_PAGE' ) && ( constant( 'WPSC_ADD_DEBUG_PAGE' ) == true ) ) )
|
| 26 |
require_once( WPSC_FILE_PATH . '/wpsc-admin/display-debug.page.php' );
|
| 27 |
|
| 28 |
-
|
| 29 |
//Woothemes integration
|
| 30 |
require_once( WPSC_FILE_PATH . '/woo-integration/woo_integration.php' );
|
| 31 |
|
|
@@ -38,31 +38,34 @@ if ( !get_option( 'wpsc_checkout_form_sets' ) ) {
|
|
| 38 |
}
|
| 39 |
/**
|
| 40 |
* wpsc_query_vars_product_list sets the ordering for the edit-products page list
|
| 41 |
-
* @access public
|
| 42 |
*
|
| 43 |
* @since 3.8
|
| 44 |
* @param $vars (array) - default query arguments
|
| 45 |
* @return $vars (array) - modified query arguments
|
| 46 |
*/
|
| 47 |
-
function wpsc_query_vars_product_list($vars){
|
| 48 |
-
|
| 49 |
-
if('wpsc-product' != $
|
| 50 |
-
|
|
|
|
| 51 |
$vars['posts_per_archive_page'] = 0;
|
| 52 |
-
|
|
|
|
| 53 |
$vars['orderby'] = 'date';
|
| 54 |
$vars['order'] = 'desc';
|
| 55 |
$vars['nopaging'] = false;
|
| 56 |
$posts_per_page = (int)get_user_option( 'edit_wpsc_product_per_page' );
|
| 57 |
-
$vars['posts_per_page'] = ( $posts_per_page )
|
| 58 |
}
|
| 59 |
-
|
|
|
|
| 60 |
$vars['orderby'] = 'menu_order title';
|
| 61 |
$vars['order'] = 'desc';
|
| 62 |
$vars['nopaging'] = true;
|
| 63 |
}
|
| 64 |
|
| 65 |
-
|
| 66 |
}
|
| 67 |
|
| 68 |
/**
|
|
@@ -77,13 +80,13 @@ function wpsc_query_vars_product_list($vars){
|
|
| 77 |
*/
|
| 78 |
function wpsc_set_screen_option($status, $option, $value){
|
| 79 |
if( in_array($option, array ("edit_wpsc_variation_per_page","edit_wpsc_product_per_page" )) ){
|
| 80 |
-
if ( "edit_wpsc_variation_per_page" == $option ){
|
| 81 |
global $user_ID;
|
| 82 |
update_user_option($user_ID,'edit_wpsc-variation_per_page',$value);
|
| 83 |
-
}
|
| 84 |
return $value;
|
| 85 |
}
|
| 86 |
-
}
|
| 87 |
add_filter('set-screen-option', 'wpsc_set_screen_option', 99, 3);
|
| 88 |
|
| 89 |
/**
|
|
@@ -96,7 +99,7 @@ add_filter('set-screen-option', 'wpsc_set_screen_option', 99, 3);
|
|
| 96 |
* @return $per_page after changes...
|
| 97 |
*/
|
| 98 |
function wpsc_drag_and_drop_ordering($per_page, $post_type){
|
| 99 |
-
global $wpdb;
|
| 100 |
if ( 'wpsc-product' == $post_type && 'dragndrop' == get_option( 'wpsc_sort_by' ) && $count = $wpdb->get_var( "SELECT COUNT(*) FROM {$wpdb->posts} WHERE `post_type`='wpsc-product' AND `post_parent`=0" ) )
|
| 101 |
$per_page = $count;
|
| 102 |
return $per_page;
|
|
@@ -278,14 +281,14 @@ function wpsc_admin_include_css_and_js_refac( $pagehook ) {
|
|
| 278 |
|
| 279 |
if ( version_compare( '3.3', get_bloginfo( 'version' ), '<' ) )
|
| 280 |
wp_admin_css( 'dashboard' );
|
| 281 |
-
|
| 282 |
if($current_screen->id == 'dashboard_page_wpsc-sales-logs'){
|
| 283 |
// jQuery
|
| 284 |
wp_enqueue_script( 'jquery' );
|
| 285 |
wp_enqueue_script( 'jquery-ui-draggable' );
|
| 286 |
wp_enqueue_script( 'jquery-ui-droppable' );
|
| 287 |
wp_enqueue_script( 'jquery-ui-sortable' );
|
| 288 |
-
|
| 289 |
// Metaboxes
|
| 290 |
wp_enqueue_script( 'common' );
|
| 291 |
wp_enqueue_script( 'wp-lists' );
|
|
@@ -746,7 +749,7 @@ function wpsc_dashboard_4months_widget() {
|
|
| 746 |
<td align="center" style="border-bottom:solid 1px #000;"><?php echo wpsc_currency_display($amount); ?></td>
|
| 747 |
<?php endforeach; ?>
|
| 748 |
</tr>
|
| 749 |
-
<?php
|
| 750 |
$tablerow++;
|
| 751 |
endforeach; ?>
|
| 752 |
</table>
|
|
@@ -810,7 +813,7 @@ function wpsc_ajax_ie_save() {
|
|
| 810 |
'post_title' => $_POST['title']
|
| 811 |
);
|
| 812 |
|
| 813 |
-
$id = wp_update_post( $product );
|
| 814 |
if ( $id > 0 ) {
|
| 815 |
//need parent meta to know which weight unit we are using
|
| 816 |
$post = get_post( $id );
|
| 25 |
if ( ( isset( $_SESSION['wpsc_activate_debug_page'] ) && ( $_SESSION['wpsc_activate_debug_page'] == true ) ) || ( defined( 'WPSC_ADD_DEBUG_PAGE' ) && ( constant( 'WPSC_ADD_DEBUG_PAGE' ) == true ) ) )
|
| 26 |
require_once( WPSC_FILE_PATH . '/wpsc-admin/display-debug.page.php' );
|
| 27 |
|
| 28 |
+
|
| 29 |
//Woothemes integration
|
| 30 |
require_once( WPSC_FILE_PATH . '/woo-integration/woo_integration.php' );
|
| 31 |
|
| 38 |
}
|
| 39 |
/**
|
| 40 |
* wpsc_query_vars_product_list sets the ordering for the edit-products page list
|
| 41 |
+
* @access public
|
| 42 |
*
|
| 43 |
* @since 3.8
|
| 44 |
* @param $vars (array) - default query arguments
|
| 45 |
* @return $vars (array) - modified query arguments
|
| 46 |
*/
|
| 47 |
+
function wpsc_query_vars_product_list( $vars ){
|
| 48 |
+
|
| 49 |
+
if( 'wpsc-product' != $vars['post_type'] || in_array( $vars['orderby'], array( 'meta_value_num', 'meta_value' ) ) )
|
| 50 |
+
return $vars;
|
| 51 |
+
|
| 52 |
$vars['posts_per_archive_page'] = 0;
|
| 53 |
+
|
| 54 |
+
if( is_admin() && isset( $vars['orderby'] ) ) {
|
| 55 |
$vars['orderby'] = 'date';
|
| 56 |
$vars['order'] = 'desc';
|
| 57 |
$vars['nopaging'] = false;
|
| 58 |
$posts_per_page = (int)get_user_option( 'edit_wpsc_product_per_page' );
|
| 59 |
+
$vars['posts_per_page'] = ( $posts_per_page ) ? $posts_per_page : 20;
|
| 60 |
}
|
| 61 |
+
|
| 62 |
+
if( 'dragndrop' == get_option( 'wpsc_sort_by' ) ){
|
| 63 |
$vars['orderby'] = 'menu_order title';
|
| 64 |
$vars['order'] = 'desc';
|
| 65 |
$vars['nopaging'] = true;
|
| 66 |
}
|
| 67 |
|
| 68 |
+
return $vars;
|
| 69 |
}
|
| 70 |
|
| 71 |
/**
|
| 80 |
*/
|
| 81 |
function wpsc_set_screen_option($status, $option, $value){
|
| 82 |
if( in_array($option, array ("edit_wpsc_variation_per_page","edit_wpsc_product_per_page" )) ){
|
| 83 |
+
if ( "edit_wpsc_variation_per_page" == $option ){
|
| 84 |
global $user_ID;
|
| 85 |
update_user_option($user_ID,'edit_wpsc-variation_per_page',$value);
|
| 86 |
+
}
|
| 87 |
return $value;
|
| 88 |
}
|
| 89 |
+
}
|
| 90 |
add_filter('set-screen-option', 'wpsc_set_screen_option', 99, 3);
|
| 91 |
|
| 92 |
/**
|
| 99 |
* @return $per_page after changes...
|
| 100 |
*/
|
| 101 |
function wpsc_drag_and_drop_ordering($per_page, $post_type){
|
| 102 |
+
global $wpdb;
|
| 103 |
if ( 'wpsc-product' == $post_type && 'dragndrop' == get_option( 'wpsc_sort_by' ) && $count = $wpdb->get_var( "SELECT COUNT(*) FROM {$wpdb->posts} WHERE `post_type`='wpsc-product' AND `post_parent`=0" ) )
|
| 104 |
$per_page = $count;
|
| 105 |
return $per_page;
|
| 281 |
|
| 282 |
if ( version_compare( '3.3', get_bloginfo( 'version' ), '<' ) )
|
| 283 |
wp_admin_css( 'dashboard' );
|
| 284 |
+
|
| 285 |
if($current_screen->id == 'dashboard_page_wpsc-sales-logs'){
|
| 286 |
// jQuery
|
| 287 |
wp_enqueue_script( 'jquery' );
|
| 288 |
wp_enqueue_script( 'jquery-ui-draggable' );
|
| 289 |
wp_enqueue_script( 'jquery-ui-droppable' );
|
| 290 |
wp_enqueue_script( 'jquery-ui-sortable' );
|
| 291 |
+
|
| 292 |
// Metaboxes
|
| 293 |
wp_enqueue_script( 'common' );
|
| 294 |
wp_enqueue_script( 'wp-lists' );
|
| 749 |
<td align="center" style="border-bottom:solid 1px #000;"><?php echo wpsc_currency_display($amount); ?></td>
|
| 750 |
<?php endforeach; ?>
|
| 751 |
</tr>
|
| 752 |
+
<?php
|
| 753 |
$tablerow++;
|
| 754 |
endforeach; ?>
|
| 755 |
</table>
|
| 813 |
'post_title' => $_POST['title']
|
| 814 |
);
|
| 815 |
|
| 816 |
+
$id = wp_update_post( $product );
|
| 817 |
if ( $id > 0 ) {
|
| 818 |
//need parent meta to know which weight unit we are using
|
| 819 |
$post = get_post( $id );
|
wpsc-admin/ajax-and-init.php
CHANGED
|
@@ -1259,7 +1259,7 @@ function wpsc_checkout_settings() {
|
|
| 1259 |
$options = array( );
|
| 1260 |
foreach ( (array)$values as $key => $form_option ) {
|
| 1261 |
$form_option = str_ireplace( "'", "", $form_option );
|
| 1262 |
-
$form_val = str_ireplace( "'", "",
|
| 1263 |
$options[$form_option] = $form_val;
|
| 1264 |
}
|
| 1265 |
|
| 1259 |
$options = array( );
|
| 1260 |
foreach ( (array)$values as $key => $form_option ) {
|
| 1261 |
$form_option = str_ireplace( "'", "", $form_option );
|
| 1262 |
+
$form_val = str_ireplace( "'", "", esc_attr( $_POST['wpsc_checkout_option_value'][$form_id][$key] ) );
|
| 1263 |
$options[$form_option] = $form_val;
|
| 1264 |
}
|
| 1265 |
|
wpsc-admin/display-items.page.php
CHANGED
|
@@ -40,10 +40,10 @@ function wpsc_additional_column_names( $columns ){
|
|
| 40 |
}
|
| 41 |
function wpsc_additional_sortable_column_names( $columns ){
|
| 42 |
|
| 43 |
-
$columns['stock'] =
|
| 44 |
-
$columns['price'] =
|
| 45 |
-
$columns['sale_price'] =
|
| 46 |
-
$columns['SKU'] =
|
| 47 |
|
| 48 |
return $columns;
|
| 49 |
}
|
|
@@ -250,29 +250,52 @@ function wpsc_additional_column_data( $column ) {
|
|
| 250 |
endswitch;
|
| 251 |
|
| 252 |
}
|
| 253 |
-
function wpsc_column_sql_orderby( $
|
| 254 |
-
|
| 255 |
-
|
| 256 |
-
|
| 257 |
-
|
| 258 |
-
|
| 259 |
-
switch ( $wp_query->query['orderby'] ) :
|
| 260 |
case 'stock' :
|
| 261 |
-
|
| 262 |
-
|
| 263 |
-
|
| 264 |
-
|
| 265 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 266 |
case 'sale_price' :
|
| 267 |
-
|
| 268 |
-
|
| 269 |
-
|
| 270 |
-
|
| 271 |
-
|
| 272 |
-
|
| 273 |
-
|
| 274 |
-
|
| 275 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 276 |
}
|
| 277 |
function wpsc_cats_restrict_manage_posts() {
|
| 278 |
global $typenow;
|
|
@@ -310,6 +333,7 @@ function wpsc_cats_restrict_manage_posts_print_terms($taxonomy, $parent = 0, $le
|
|
| 310 |
* Restrict the products page to showing only parent products and not variations.
|
| 311 |
* @since 3.8
|
| 312 |
*/
|
|
|
|
| 313 |
function wpsc_no_minors_allowed( $vars ) {
|
| 314 |
global $current_screen;
|
| 315 |
|
|
@@ -321,14 +345,26 @@ function wpsc_no_minors_allowed( $vars ) {
|
|
| 321 |
return $vars;
|
| 322 |
}
|
| 323 |
|
| 324 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 325 |
add_action( 'admin_head', 'wpsc_additional_column_name_variations' );
|
| 326 |
add_action( 'restrict_manage_posts', 'wpsc_cats_restrict_manage_posts' );
|
| 327 |
add_action( 'manage_pages_custom_column', 'wpsc_additional_column_data', 10, 2 );
|
| 328 |
add_filter( 'manage_edit-wpsc-product_sortable_columns', 'wpsc_additional_sortable_column_names' );
|
| 329 |
add_filter( 'manage_edit-wpsc-product_columns', 'wpsc_additional_column_names' );
|
| 330 |
add_filter( 'manage_wpsc-product_posts_columns', 'wpsc_additional_column_names' );
|
| 331 |
-
|
| 332 |
|
| 333 |
|
| 334 |
/**
|
| 40 |
}
|
| 41 |
function wpsc_additional_sortable_column_names( $columns ){
|
| 42 |
|
| 43 |
+
$columns['stock'] = 'stock';
|
| 44 |
+
$columns['price'] = 'price';
|
| 45 |
+
$columns['sale_price'] = 'sale_price';
|
| 46 |
+
$columns['SKU'] = 'SKU';
|
| 47 |
|
| 48 |
return $columns;
|
| 49 |
}
|
| 250 |
endswitch;
|
| 251 |
|
| 252 |
}
|
| 253 |
+
function wpsc_column_sql_orderby( $vars ) {
|
| 254 |
+
|
| 255 |
+
if ( ! isset( $vars['post_type'] ) || 'wpsc-product' != $vars['post_type'] || ! isset( $vars['orderby'] ) )
|
| 256 |
+
return $vars;
|
| 257 |
+
|
| 258 |
+
switch ( $vars['orderby'] ) :
|
|
|
|
| 259 |
case 'stock' :
|
| 260 |
+
$vars = array_merge(
|
| 261 |
+
$vars,
|
| 262 |
+
array(
|
| 263 |
+
'meta_key' => '_wpsc_stock',
|
| 264 |
+
'orderby' => 'meta_value_num'
|
| 265 |
+
)
|
| 266 |
+
);
|
| 267 |
+
break;
|
| 268 |
+
case 'price' :
|
| 269 |
+
$vars = array_merge(
|
| 270 |
+
$vars,
|
| 271 |
+
array(
|
| 272 |
+
'meta_key' => '_wpsc_price',
|
| 273 |
+
'orderby' => 'meta_value_num'
|
| 274 |
+
)
|
| 275 |
+
);
|
| 276 |
+
break;
|
| 277 |
case 'sale_price' :
|
| 278 |
+
$vars = array_merge(
|
| 279 |
+
$vars,
|
| 280 |
+
array(
|
| 281 |
+
'meta_key' => '_wpsc_special_price',
|
| 282 |
+
'orderby' => 'meta_value_num'
|
| 283 |
+
)
|
| 284 |
+
);
|
| 285 |
+
|
| 286 |
+
break;
|
| 287 |
+
case 'SKU' :
|
| 288 |
+
$vars = array_merge(
|
| 289 |
+
$vars,
|
| 290 |
+
array(
|
| 291 |
+
'meta_key' => '_wpsc_sku',
|
| 292 |
+
'orderby' => 'meta_value'
|
| 293 |
+
)
|
| 294 |
+
);
|
| 295 |
+
break;
|
| 296 |
+
endswitch;
|
| 297 |
+
|
| 298 |
+
return $vars;
|
| 299 |
}
|
| 300 |
function wpsc_cats_restrict_manage_posts() {
|
| 301 |
global $typenow;
|
| 333 |
* Restrict the products page to showing only parent products and not variations.
|
| 334 |
* @since 3.8
|
| 335 |
*/
|
| 336 |
+
|
| 337 |
function wpsc_no_minors_allowed( $vars ) {
|
| 338 |
global $current_screen;
|
| 339 |
|
| 345 |
return $vars;
|
| 346 |
}
|
| 347 |
|
| 348 |
+
/**
|
| 349 |
+
* wpsc_sortable_column_load
|
| 350 |
+
*
|
| 351 |
+
* Only sorts columns on edit.php page.
|
| 352 |
+
* @since 3.8.8
|
| 353 |
+
*/
|
| 354 |
+
|
| 355 |
+
function wpsc_sortable_column_load() {
|
| 356 |
+
add_filter( 'request', 'wpsc_no_minors_allowed' );
|
| 357 |
+
add_filter( 'request', 'wpsc_column_sql_orderby', 8 );
|
| 358 |
+
}
|
| 359 |
+
|
| 360 |
+
add_action( 'load-edit.php', 'wpsc_sortable_column_load' );
|
| 361 |
add_action( 'admin_head', 'wpsc_additional_column_name_variations' );
|
| 362 |
add_action( 'restrict_manage_posts', 'wpsc_cats_restrict_manage_posts' );
|
| 363 |
add_action( 'manage_pages_custom_column', 'wpsc_additional_column_data', 10, 2 );
|
| 364 |
add_filter( 'manage_edit-wpsc-product_sortable_columns', 'wpsc_additional_sortable_column_names' );
|
| 365 |
add_filter( 'manage_edit-wpsc-product_columns', 'wpsc_additional_column_names' );
|
| 366 |
add_filter( 'manage_wpsc-product_posts_columns', 'wpsc_additional_column_names' );
|
| 367 |
+
|
| 368 |
|
| 369 |
|
| 370 |
/**
|
wpsc-admin/display-sales-logs.php
CHANGED
|
@@ -516,14 +516,14 @@ function wpsc_purchlogs_custom_fields(){
|
|
| 516 |
<h4><?php _e( 'Cart Items with Custom Files' , 'wpsc' ); ?>:</h4>
|
| 517 |
<?php
|
| 518 |
foreach($files as $file){
|
| 519 |
-
echo $file;
|
| 520 |
}
|
| 521 |
}?>
|
| 522 |
<?php if(count($messages) > 0){ ?>
|
| 523 |
<h4><?php _e( 'Cart Items with Custom Messages' , 'wpsc' ); ?>:</h4>
|
| 524 |
<?php
|
| 525 |
foreach($messages as $message){
|
| 526 |
-
echo $message;
|
| 527 |
}
|
| 528 |
} ?>
|
| 529 |
</div>
|
| 516 |
<h4><?php _e( 'Cart Items with Custom Files' , 'wpsc' ); ?>:</h4>
|
| 517 |
<?php
|
| 518 |
foreach($files as $file){
|
| 519 |
+
echo "<p>".esc_html($file)."</p>";
|
| 520 |
}
|
| 521 |
}?>
|
| 522 |
<?php if(count($messages) > 0){ ?>
|
| 523 |
<h4><?php _e( 'Cart Items with Custom Messages' , 'wpsc' ); ?>:</h4>
|
| 524 |
<?php
|
| 525 |
foreach($messages as $message){
|
| 526 |
+
echo "<p>".esc_html($message)."</p>";
|
| 527 |
}
|
| 528 |
} ?>
|
| 529 |
</div>
|
wpsc-admin/includes/save-data.functions.php
CHANGED
|
@@ -632,4 +632,4 @@ function wpsc_save_category_set($category_id, $tt_id) {
|
|
| 632 |
}
|
| 633 |
|
| 634 |
|
| 635 |
-
?>
|
| 632 |
}
|
| 633 |
|
| 634 |
|
| 635 |
+
?>
|
wpsc-admin/includes/settings-pages/admin.php
CHANGED
|
@@ -65,7 +65,7 @@ global $wpdb;
|
|
| 65 |
<input type='radio' value='1' name='wpsc_options[wpsc_check_mime_types]' id='wpsc_check_mime_types1' <?php echo $wpsc_check_mime_types2; ?> /> <label for='wpsc_check_mime_types1'><?php _e('No', 'wpsc');?></label><br />
|
| 66 |
|
| 67 |
<span class="wpscsmall description">
|
| 68 |
-
<?php _e('Warning: Disabling this exposes your site to greater possibility of malicious files being uploaded, we
|
| 69 |
</span>
|
| 70 |
</td>
|
| 71 |
</tr>
|
| 65 |
<input type='radio' value='1' name='wpsc_options[wpsc_check_mime_types]' id='wpsc_check_mime_types1' <?php echo $wpsc_check_mime_types2; ?> /> <label for='wpsc_check_mime_types1'><?php _e('No', 'wpsc');?></label><br />
|
| 66 |
|
| 67 |
<span class="wpscsmall description">
|
| 68 |
+
<?php _e('Warning: Disabling this exposes your site to greater possibility of malicious files being uploaded, we recommend installing the Fileinfo extention for PHP rather than disabling this.', 'wpsc'); ?>
|
| 69 |
</span>
|
| 70 |
</td>
|
| 71 |
</tr>
|
wpsc-core/js/wp-e-commerce.js
CHANGED
|
@@ -289,18 +289,19 @@ jQuery(document).ready(function () {
|
|
| 289 |
// update the price when the variations are altered.
|
| 290 |
jQuery(".wpsc_select_variation").live('change', function() {
|
| 291 |
jQuery('option[value="0"]', this).attr('disabled', 'disabled');
|
| 292 |
-
parent_form = jQuery(this).
|
| 293 |
if ( parent_form.length == 0 )
|
| 294 |
return;
|
| 295 |
-
|
|
|
|
| 296 |
jQuery.post( 'index.php?update_product_price=true', form_values, function(response) {
|
| 297 |
-
var stock_display = jQuery('div#stock_display_' +
|
| 298 |
-
price_field = jQuery('input#product_price_' +
|
| 299 |
-
price_span = jQuery('#product_price_' +
|
| 300 |
-
donation_price = jQuery('input#donation_price_' +
|
| 301 |
-
old_price = jQuery('#old_product_price_' +
|
| 302 |
-
save = jQuery('#yousave_' +
|
| 303 |
-
buynow = jQuery('#BB_BuyButtonForm' +
|
| 304 |
if ( response.variation_found ) {
|
| 305 |
if ( response.stock_available ) {
|
| 306 |
stock_display.removeClass('out_of_stock').addClass('in_stock');
|
|
@@ -492,7 +493,9 @@ jQuery(document).ready(function(){
|
|
| 492 |
if(null != value){
|
| 493 |
value = value.replace(/<span class="?asterix"?>\*<\/span>/i,'');
|
| 494 |
}
|
| 495 |
-
|
|
|
|
|
|
|
| 496 |
if(real_value != '')
|
| 497 |
jQuery(this).val(real_value).removeClass('intra-field-label');
|
| 498 |
});
|
| 289 |
// update the price when the variations are altered.
|
| 290 |
jQuery(".wpsc_select_variation").live('change', function() {
|
| 291 |
jQuery('option[value="0"]', this).attr('disabled', 'disabled');
|
| 292 |
+
var parent_form = jQuery(this).closest("form.product_form");
|
| 293 |
if ( parent_form.length == 0 )
|
| 294 |
return;
|
| 295 |
+
var prod_id = jQuery("input[name='product_id']",parent_form).val();
|
| 296 |
+
var form_values =jQuery("input[name='product_id'], .wpsc_select_variation",parent_form).serialize( );
|
| 297 |
jQuery.post( 'index.php?update_product_price=true', form_values, function(response) {
|
| 298 |
+
var stock_display = jQuery('div#stock_display_' + prod_id),
|
| 299 |
+
price_field = jQuery('input#product_price_' + prod_id),
|
| 300 |
+
price_span = jQuery('#product_price_' + prod_id + '.pricedisplay, #product_price_' + prod_id + ' .currentprice'),
|
| 301 |
+
donation_price = jQuery('input#donation_price_' + prod_id),
|
| 302 |
+
old_price = jQuery('#old_product_price_' + prod_id),
|
| 303 |
+
save = jQuery('#yousave_' + prod_id),
|
| 304 |
+
buynow = jQuery('#BB_BuyButtonForm' + prod_id);
|
| 305 |
if ( response.variation_found ) {
|
| 306 |
if ( response.stock_available ) {
|
| 307 |
stock_display.removeClass('out_of_stock').addClass('in_stock');
|
| 493 |
if(null != value){
|
| 494 |
value = value.replace(/<span class="?asterix"?>\*<\/span>/i,'');
|
| 495 |
}
|
| 496 |
+
|
| 497 |
+
if( jQuery.fn.inlineFieldLabel )
|
| 498 |
+
jQuery(this).inlineFieldLabel({label:jQuery.trim(value)});
|
| 499 |
if(real_value != '')
|
| 500 |
jQuery(this).val(real_value).removeClass('intra-field-label');
|
| 501 |
});
|
wpsc-core/wpsc-constants.php
CHANGED
|
@@ -26,9 +26,9 @@ function wpsc_core_constants() {
|
|
| 26 |
if(!defined('WPSC_URL'))
|
| 27 |
define( 'WPSC_URL', plugins_url( '', __FILE__ ) );
|
| 28 |
// Define Plugin version
|
| 29 |
-
define( 'WPSC_VERSION', '3.8.7.
|
| 30 |
-
define( 'WPSC_MINOR_VERSION', '
|
| 31 |
-
define( 'WPSC_PRESENTABLE_VERSION', '3.8.7.
|
| 32 |
|
| 33 |
// Define Debug Variables for developers
|
| 34 |
define( 'WPSC_DEBUG', false );
|
| 26 |
if(!defined('WPSC_URL'))
|
| 27 |
define( 'WPSC_URL', plugins_url( '', __FILE__ ) );
|
| 28 |
// Define Plugin version
|
| 29 |
+
define( 'WPSC_VERSION', '3.8.7.2' );
|
| 30 |
+
define( 'WPSC_MINOR_VERSION', '463466' );
|
| 31 |
+
define( 'WPSC_PRESENTABLE_VERSION', '3.8.7.2' );
|
| 32 |
|
| 33 |
// Define Debug Variables for developers
|
| 34 |
define( 'WPSC_DEBUG', false );
|
wpsc-core/wpsc-includes.php
CHANGED
|
@@ -58,7 +58,6 @@ require_once( WPSC_FILE_PATH . '/wpsc-includes/shipping.helper.php' );
|
|
| 58 |
if ( is_admin() )
|
| 59 |
include_once( WPSC_FILE_PATH . '/wpsc-admin/admin.php' );
|
| 60 |
|
| 61 |
-
|
| 62 |
-
require_once( WPSC_FILE_PATH . '/wpsc-includes/cron.php' );
|
| 63 |
|
| 64 |
?>
|
| 58 |
if ( is_admin() )
|
| 59 |
include_once( WPSC_FILE_PATH . '/wpsc-admin/admin.php' );
|
| 60 |
|
| 61 |
+
require_once( WPSC_FILE_PATH . '/wpsc-includes/cron.php' );
|
|
|
|
| 62 |
|
| 63 |
?>
|
wpsc-includes/checkout.class.php
CHANGED
|
@@ -628,7 +628,7 @@ class wpsc_checkout {
|
|
| 628 |
foreach ( $options as $label => $value ) {
|
| 629 |
?>
|
| 630 |
<label>
|
| 631 |
-
<input <?php checked( in_array( $value, (array) $saved_form_data ) ); ?> type="checkbox" name="collected_data[<?php echo esc_attr( $this->checkout_item->id ); ?>]<?php echo $an_array; ?>[]
|
| 632 |
<?php echo esc_html( $label ); ?>
|
| 633 |
</label>
|
| 634 |
<?php
|
| 628 |
foreach ( $options as $label => $value ) {
|
| 629 |
?>
|
| 630 |
<label>
|
| 631 |
+
<input <?php checked( in_array( $value, (array) $saved_form_data ) ); ?> type="checkbox" name="collected_data[<?php echo esc_attr( $this->checkout_item->id ); ?>]<?php echo $an_array; ?>[]" value="<?php echo esc_attr( $value ); ?>" />
|
| 632 |
<?php echo esc_html( $label ); ?>
|
| 633 |
</label>
|
| 634 |
<?php
|
wpsc-includes/coupons.class.php
CHANGED
|
@@ -389,12 +389,8 @@ class wpsc_coupons {
|
|
| 389 |
*/
|
| 390 |
function uses_coupons() {
|
| 391 |
global $wpdb;
|
| 392 |
-
$
|
| 393 |
-
|
| 394 |
-
return true;
|
| 395 |
-
}else{
|
| 396 |
-
return false;
|
| 397 |
-
}
|
| 398 |
}
|
| 399 |
|
| 400 |
|
| 389 |
*/
|
| 390 |
function uses_coupons() {
|
| 391 |
global $wpdb;
|
| 392 |
+
$num_active_coupons = $wpdb->get_var("SELECT COUNT(id) as c FROM `".WPSC_TABLE_COUPON_CODES."` WHERE active='1'");
|
| 393 |
+
return ( $num_active_coupons > 0 );
|
|
|
|
|
|
|
|
|
|
|
|
|
| 394 |
}
|
| 395 |
|
| 396 |
|
wpsc-includes/cron.php
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
<?php
|
| 2 |
add_action( 'wpsc_hourly_cron_task', 'wpsc_clear_stock_claims' );
|
| 3 |
/**
|
| 4 |
-
* wpsc_clear_stock_claims, clears the stock claims, runs using wp-cron
|
| 5 |
*/
|
| 6 |
function wpsc_clear_stock_claims() {
|
| 7 |
global $wpdb;
|
| 1 |
<?php
|
| 2 |
add_action( 'wpsc_hourly_cron_task', 'wpsc_clear_stock_claims' );
|
| 3 |
/**
|
| 4 |
+
* wpsc_clear_stock_claims, clears the stock claims, runs using wp-cron and when editing purchase log statuses via the dashboard
|
| 5 |
*/
|
| 6 |
function wpsc_clear_stock_claims() {
|
| 7 |
global $wpdb;
|
wpsc-includes/meta.functions.php
CHANGED
|
@@ -267,4 +267,4 @@ class wpsc_custom_meta {
|
|
| 267 |
}
|
| 268 |
}
|
| 269 |
}
|
| 270 |
-
?>
|
| 267 |
}
|
| 268 |
}
|
| 269 |
}
|
| 270 |
+
?>
|
wpsc-includes/productfeed.php
CHANGED
|
@@ -46,7 +46,7 @@ function wpsc_generate_product_feed() {
|
|
| 46 |
}
|
| 47 |
|
| 48 |
$args['post_type'] = 'wpsc-product';
|
| 49 |
-
$args['posts_per_page'] =
|
| 50 |
|
| 51 |
$products = query_posts ($args);
|
| 52 |
|
|
@@ -144,6 +144,7 @@ function wpsc_generate_product_feed() {
|
|
| 144 |
$google_elements = $google_elements['elements'];
|
| 145 |
|
| 146 |
$done_condition = FALSE;
|
|
|
|
| 147 |
$done_weight = FALSE;
|
| 148 |
|
| 149 |
if ( count ( $google_elements ) ) {
|
|
@@ -164,6 +165,8 @@ function wpsc_generate_product_feed() {
|
|
| 164 |
if ($element_name == 'g:condition')
|
| 165 |
$done_condition = TRUE;
|
| 166 |
|
|
|
|
|
|
|
| 167 |
}
|
| 168 |
|
| 169 |
}
|
|
@@ -171,6 +174,18 @@ function wpsc_generate_product_feed() {
|
|
| 171 |
if (!$done_condition)
|
| 172 |
$output .= " <g:condition>new</g:condition>\n\r";
|
| 173 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 174 |
if ( ! $done_weight ) {
|
| 175 |
$wpsc_product_meta = get_product_meta( $post->ID, 'product_metadata',true );
|
| 176 |
$weight = apply_filters ( 'wpsc_google_shipping_weight', $wpsc_product_meta['weight'], $post->ID );
|
| 46 |
}
|
| 47 |
|
| 48 |
$args['post_type'] = 'wpsc-product';
|
| 49 |
+
$args['posts_per_page'] = 9999;
|
| 50 |
|
| 51 |
$products = query_posts ($args);
|
| 52 |
|
| 144 |
$google_elements = $google_elements['elements'];
|
| 145 |
|
| 146 |
$done_condition = FALSE;
|
| 147 |
+
$done_availability = FALSE;
|
| 148 |
$done_weight = FALSE;
|
| 149 |
|
| 150 |
if ( count ( $google_elements ) ) {
|
| 165 |
if ($element_name == 'g:condition')
|
| 166 |
$done_condition = TRUE;
|
| 167 |
|
| 168 |
+
if ($element_name == 'g:availability')
|
| 169 |
+
$done_availability = true;
|
| 170 |
}
|
| 171 |
|
| 172 |
}
|
| 174 |
if (!$done_condition)
|
| 175 |
$output .= " <g:condition>new</g:condition>\n\r";
|
| 176 |
|
| 177 |
+
if (!$done_availability) {
|
| 178 |
+
|
| 179 |
+
if(wpsc_product_has_stock()) :
|
| 180 |
+
$product_availability = "in stock";
|
| 181 |
+
else :
|
| 182 |
+
$product_availability = "out of stock";
|
| 183 |
+
endif ;
|
| 184 |
+
|
| 185 |
+
$output .= " <g:availability>$product_availability</g:availability>";
|
| 186 |
+
|
| 187 |
+
}
|
| 188 |
+
|
| 189 |
if ( ! $done_weight ) {
|
| 190 |
$wpsc_product_meta = get_product_meta( $post->ID, 'product_metadata',true );
|
| 191 |
$weight = apply_filters ( 'wpsc_google_shipping_weight', $wpsc_product_meta['weight'], $post->ID );
|
wpsc-includes/purchaselogs.class.php
CHANGED
|
@@ -754,8 +754,7 @@ class wpsc_purchaselogs {
|
|
| 754 |
}
|
| 755 |
|
| 756 |
function deletelog( $deleteid ) {
|
| 757 |
-
|
| 758 |
-
global $wpdb;
|
| 759 |
if ( is_numeric( $deleteid ) ) {
|
| 760 |
|
| 761 |
$delete_log_form_sql = "SELECT * FROM `" . WPSC_TABLE_CART_CONTENTS . "` WHERE `purchaseid`='$deleteid'";
|
| 754 |
}
|
| 755 |
|
| 756 |
function deletelog( $deleteid ) {
|
| 757 |
+
global $wpdb;
|
|
|
|
| 758 |
if ( is_numeric( $deleteid ) ) {
|
| 759 |
|
| 760 |
$delete_log_form_sql = "SELECT * FROM `" . WPSC_TABLE_CART_CONTENTS . "` WHERE `purchaseid`='$deleteid'";
|
wpsc-includes/theme.functions.php
CHANGED
|
@@ -564,17 +564,16 @@ function wpsc_enqueue_user_script_and_css() {
|
|
| 564 |
}
|
| 565 |
}
|
| 566 |
|
| 567 |
-
$
|
| 568 |
-
|
| 569 |
-
if ( is_ssl() )
|
| 570 |
-
$siteurl = str_replace( "http://", "https://", $siteurl );
|
| 571 |
if( get_option( 'wpsc_share_this' ) == 1 )
|
| 572 |
-
|
|
|
|
| 573 |
wp_enqueue_script( 'jQuery' );
|
| 574 |
wp_enqueue_script( 'wp-e-commerce', WPSC_CORE_JS_URL . '/wp-e-commerce.js', array( 'jquery' ), $version_identifier );
|
| 575 |
wp_enqueue_script( 'infieldlabel', WPSC_CORE_JS_URL . '/jquery.infieldlabel.min.js', array( 'jquery' ), $version_identifier );
|
| 576 |
wp_enqueue_script( 'wp-e-commerce-ajax-legacy', WPSC_CORE_JS_URL . '/ajax.js', false, $version_identifier );
|
| 577 |
-
wp_enqueue_script( 'wp-e-commerce-dynamic',
|
| 578 |
wp_localize_script( 'wp-e-commerce-dynamic', 'wpsc_ajax', array( 'ajaxurl' => admin_url( 'admin-ajax.php' ) ) );
|
| 579 |
wp_enqueue_script( 'livequery', WPSC_URL . '/wpsc-admin/js/jquery.livequery.js', array( 'jquery' ), '1.0.3' );
|
| 580 |
if( get_option( 'product_ratings' ) == 1 )
|
|
@@ -595,7 +594,7 @@ function wpsc_enqueue_user_script_and_css() {
|
|
| 595 |
wp_enqueue_style( 'wpsc-theme-css-compatibility', WPSC_CORE_THEME_URL . 'compatibility.css', false, $version_identifier, 'all' );
|
| 596 |
if( get_option( 'product_ratings' ) == 1 )
|
| 597 |
wp_enqueue_style( 'wpsc-product-rater', WPSC_CORE_JS_URL . '/product_rater.css', false, $version_identifier, 'all' );
|
| 598 |
-
wp_enqueue_style( 'wp-e-commerce-dynamic',
|
| 599 |
|
| 600 |
}
|
| 601 |
|
| 564 |
}
|
| 565 |
}
|
| 566 |
|
| 567 |
+
$remote_protocol = is_ssl() ? 'https://' : 'http://';
|
| 568 |
+
|
|
|
|
|
|
|
| 569 |
if( get_option( 'wpsc_share_this' ) == 1 )
|
| 570 |
+
wp_enqueue_script( 'sharethis', $remote_protocol . 'w.sharethis.com/button/buttons.js', array(), false, true );
|
| 571 |
+
|
| 572 |
wp_enqueue_script( 'jQuery' );
|
| 573 |
wp_enqueue_script( 'wp-e-commerce', WPSC_CORE_JS_URL . '/wp-e-commerce.js', array( 'jquery' ), $version_identifier );
|
| 574 |
wp_enqueue_script( 'infieldlabel', WPSC_CORE_JS_URL . '/jquery.infieldlabel.min.js', array( 'jquery' ), $version_identifier );
|
| 575 |
wp_enqueue_script( 'wp-e-commerce-ajax-legacy', WPSC_CORE_JS_URL . '/ajax.js', false, $version_identifier );
|
| 576 |
+
wp_enqueue_script( 'wp-e-commerce-dynamic', site_url( '/index.php?wpsc_user_dynamic_js=true' ), false, $version_identifier );
|
| 577 |
wp_localize_script( 'wp-e-commerce-dynamic', 'wpsc_ajax', array( 'ajaxurl' => admin_url( 'admin-ajax.php' ) ) );
|
| 578 |
wp_enqueue_script( 'livequery', WPSC_URL . '/wpsc-admin/js/jquery.livequery.js', array( 'jquery' ), '1.0.3' );
|
| 579 |
if( get_option( 'product_ratings' ) == 1 )
|
| 594 |
wp_enqueue_style( 'wpsc-theme-css-compatibility', WPSC_CORE_THEME_URL . 'compatibility.css', false, $version_identifier, 'all' );
|
| 595 |
if( get_option( 'product_ratings' ) == 1 )
|
| 596 |
wp_enqueue_style( 'wpsc-product-rater', WPSC_CORE_JS_URL . '/product_rater.css', false, $version_identifier, 'all' );
|
| 597 |
+
wp_enqueue_style( 'wp-e-commerce-dynamic', site_url( "/index.php?wpsc_user_dynamic_css=true&category=$category_id" ), false, $version_identifier, 'all' );
|
| 598 |
|
| 599 |
}
|
| 600 |
|
wpsc-languages/EN_en.php
CHANGED
|
@@ -21,7 +21,7 @@ define('TXT_WPSC_DELETE_CURRENCY','Delete Currency');
|
|
| 21 |
define('TXT_WPSC_NO_ZIPCODE','Please provide a Zipcode and click Calculate in order to continue.');
|
| 22 |
|
| 23 |
define('TXT_WPSC_DROPSHOP_CRAFTYC','Crafty');
|
| 24 |
-
define('TXT_WPSC_CHECK_MIME_TYPES_WARNING', 'Warning: Disabling this exposes your site to greater possibility of malicious files being uploaded, we
|
| 25 |
define('TXT_WPSC_CHECK_MIME_TYPES', 'Check MIME types on file uploads');
|
| 26 |
define('TXT_WPSC_SHIPPING_SAME_AS_BILLING', 'Enable Shipping Same as Billing Option: ');
|
| 27 |
define('TXT_WPSC_UDPATING_CART', 'Updating...');
|
| 21 |
define('TXT_WPSC_NO_ZIPCODE','Please provide a Zipcode and click Calculate in order to continue.');
|
| 22 |
|
| 23 |
define('TXT_WPSC_DROPSHOP_CRAFTYC','Crafty');
|
| 24 |
+
define('TXT_WPSC_CHECK_MIME_TYPES_WARNING', 'Warning: Disabling this exposes your site to greater possibility of malicious files being uploaded, we recommend installing the Fileinfo extention for PHP rather than disabling this.');
|
| 25 |
define('TXT_WPSC_CHECK_MIME_TYPES', 'Check MIME types on file uploads');
|
| 26 |
define('TXT_WPSC_SHIPPING_SAME_AS_BILLING', 'Enable Shipping Same as Billing Option: ');
|
| 27 |
define('TXT_WPSC_UDPATING_CART', 'Updating...');
|
wpsc-merchants/paypal-express.merchant.php
CHANGED
|
@@ -114,7 +114,7 @@ class wpsc_merchant_paypal_express extends wpsc_merchant {
|
|
| 114 |
}
|
| 115 |
$received_values = array();
|
| 116 |
$received_values['cmd'] = '_notify-validate';
|
| 117 |
-
$received_values += $_POST;
|
| 118 |
$options = array(
|
| 119 |
'timeout' => 5,
|
| 120 |
'body' => $received_values,
|
|
@@ -997,4 +997,4 @@ function paypal_deformatNVP($nvpstr) {
|
|
| 997 |
return $nvpArray;
|
| 998 |
}
|
| 999 |
add_action('init', 'paypal_processingfunctions');
|
| 1000 |
-
?>
|
| 114 |
}
|
| 115 |
$received_values = array();
|
| 116 |
$received_values['cmd'] = '_notify-validate';
|
| 117 |
+
$received_values += stripslashes_deep ( $_POST );
|
| 118 |
$options = array(
|
| 119 |
'timeout' => 5,
|
| 120 |
'body' => $received_values,
|
| 997 |
return $nvpArray;
|
| 998 |
}
|
| 999 |
add_action('init', 'paypal_processingfunctions');
|
| 1000 |
+
?>
|
wpsc-merchants/paypal-pro.merchant.php
CHANGED
|
@@ -244,7 +244,7 @@ class wpsc_merchant_paypal_pro extends wpsc_merchant {
|
|
| 244 |
|
| 245 |
$received_values = array( );
|
| 246 |
$received_values['cmd'] = '_notify-validate';
|
| 247 |
-
$received_values += $_POST;
|
| 248 |
|
| 249 |
$options = array(
|
| 250 |
'timeout' => 5,
|
|
@@ -538,4 +538,4 @@ if ( in_array( 'wpsc_merchant_paypal_pro', (array)get_option( 'custom_gateway_op
|
|
| 538 |
";
|
| 539 |
|
| 540 |
}
|
| 541 |
-
?>
|
| 244 |
|
| 245 |
$received_values = array( );
|
| 246 |
$received_values['cmd'] = '_notify-validate';
|
| 247 |
+
$received_values += stripslashes_deep ( $_POST );
|
| 248 |
|
| 249 |
$options = array(
|
| 250 |
'timeout' => 5,
|
| 538 |
";
|
| 539 |
|
| 540 |
}
|
| 541 |
+
?>
|
wpsc-merchants/paypal-standard.merchant.php
CHANGED
|
@@ -339,7 +339,7 @@ class wpsc_merchant_paypal_standard extends wpsc_merchant {
|
|
| 339 |
$paypal_url = get_option('paypal_multiple_url');
|
| 340 |
$received_values = array();
|
| 341 |
$received_values['cmd'] = '_notify-validate';
|
| 342 |
-
$received_values += $_POST;
|
| 343 |
$options = array(
|
| 344 |
'timeout' => 5,
|
| 345 |
'body' => $received_values,
|
|
@@ -758,4 +758,4 @@ $output .= "
|
|
| 758 |
|
| 759 |
return $output;
|
| 760 |
}
|
| 761 |
-
?>
|
| 339 |
$paypal_url = get_option('paypal_multiple_url');
|
| 340 |
$received_values = array();
|
| 341 |
$received_values['cmd'] = '_notify-validate';
|
| 342 |
+
$received_values += stripslashes_deep ($_POST);
|
| 343 |
$options = array(
|
| 344 |
'timeout' => 5,
|
| 345 |
'body' => $received_values,
|
| 758 |
|
| 759 |
return $output;
|
| 760 |
}
|
| 761 |
+
?>
|
wpsc-shipping/australiapost.php
CHANGED
|
@@ -1,20 +1,4 @@
|
|
| 1 |
<?php
|
| 2 |
-
/* Copyright 2009-2010 OM4 (email: info@om4.com.au web: http://om4.com.au/)
|
| 3 |
-
|
| 4 |
-
This program is free software; you can redistribute it and/or modify
|
| 5 |
-
it under the terms of the GNU General Public License as published by
|
| 6 |
-
the Free Software Foundation; either version 2 of the License, or
|
| 7 |
-
(at your option) any later version.
|
| 8 |
-
|
| 9 |
-
This program is distributed in the hope that it will be useful,
|
| 10 |
-
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 11 |
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 12 |
-
GNU General Public License for more details.
|
| 13 |
-
|
| 14 |
-
You should have received a copy of the GNU General Public License
|
| 15 |
-
along with this program; if not, write to the Free Software
|
| 16 |
-
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
| 17 |
-
*/
|
| 18 |
/**
|
| 19 |
* WP e-Commerce Australia Post shipping module - http://auspost.com.au
|
| 20 |
*
|
| 1 |
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
/**
|
| 3 |
* WP e-Commerce Australia Post shipping module - http://auspost.com.au
|
| 4 |
*
|
wpsc-shipping/flatrate.php
CHANGED
|
@@ -131,7 +131,7 @@ class flatrate {
|
|
| 131 |
|
| 132 |
}
|
| 133 |
|
| 134 |
-
if (
|
| 135 |
}
|
| 136 |
|
| 137 |
} else {
|
| 131 |
|
| 132 |
}
|
| 133 |
|
| 134 |
+
if ( isset ( $flatrates[$results] ) ) return array("Flat Rate"=>(float)$flatrates[$results]);
|
| 135 |
}
|
| 136 |
|
| 137 |
} else {
|
wpsc-shipping/ups_20.php
CHANGED
|
@@ -815,8 +815,8 @@ class ash_ups {
|
|
| 815 |
// If ths zip code is provided via a form post use it!
|
| 816 |
$args['dest_pcode'] = '';
|
| 817 |
if(isset($_POST['zipcode']) && ($_POST['zipcode'] != "Your Zipcode" && $_POST['zipcode'] != "YOURZIPCODE")) {
|
| 818 |
-
$args['dest_pcode'] = $_POST['zipcode'];
|
| 819 |
-
$_SESSION['wpsc_zipcode'] = $_POST['zipcode'];
|
| 820 |
} else if(isset($_SESSION['wpsc_zipcode']) && ($_POST['zipcode'] != "Your Zipcode" && $_POST['zipcode'] != "YOURZIPCODE")) {
|
| 821 |
// Well, we have a zip code in the session and no new one provided
|
| 822 |
$args['dest_pcode'] = $_SESSION['wpsc_zipcode'];
|
|
@@ -828,8 +828,8 @@ class ash_ups {
|
|
| 828 |
|
| 829 |
// If the region code is provided via a form post use it!
|
| 830 |
if(isset($_POST['region']) && !empty($_POST['region'])) {
|
| 831 |
-
$query ="SELECT `".WPSC_TABLE_REGION_TAX."`.* FROM `".WPSC_TABLE_REGION_TAX."`
|
| 832 |
-
WHERE `".WPSC_TABLE_REGION_TAX."`.`id` =
|
| 833 |
$dest_region_data = $wpdb->get_results($query, ARRAY_A);
|
| 834 |
$args['dest_state'] = (is_array($dest_region_data)) ? $dest_region_data[0]['code'] : "";
|
| 835 |
$_SESSION['wpsc_state'] = $args['dest_state'];
|
| 815 |
// If ths zip code is provided via a form post use it!
|
| 816 |
$args['dest_pcode'] = '';
|
| 817 |
if(isset($_POST['zipcode']) && ($_POST['zipcode'] != "Your Zipcode" && $_POST['zipcode'] != "YOURZIPCODE")) {
|
| 818 |
+
$args['dest_pcode'] = esc_attr( $_POST['zipcode'] );
|
| 819 |
+
$_SESSION['wpsc_zipcode'] = esc_attr( $_POST['zipcode'] );
|
| 820 |
} else if(isset($_SESSION['wpsc_zipcode']) && ($_POST['zipcode'] != "Your Zipcode" && $_POST['zipcode'] != "YOURZIPCODE")) {
|
| 821 |
// Well, we have a zip code in the session and no new one provided
|
| 822 |
$args['dest_pcode'] = $_SESSION['wpsc_zipcode'];
|
| 828 |
|
| 829 |
// If the region code is provided via a form post use it!
|
| 830 |
if(isset($_POST['region']) && !empty($_POST['region'])) {
|
| 831 |
+
$query = $wpdb->prepare( "SELECT `".WPSC_TABLE_REGION_TAX."`.* FROM `".WPSC_TABLE_REGION_TAX."`
|
| 832 |
+
WHERE `".WPSC_TABLE_REGION_TAX."`.`id` = %d", $_POST['region'] );
|
| 833 |
$dest_region_data = $wpdb->get_results($query, ARRAY_A);
|
| 834 |
$args['dest_state'] = (is_array($dest_region_data)) ? $dest_region_data[0]['code'] : "";
|
| 835 |
$_SESSION['wpsc_state'] = $args['dest_state'];
|
wpsc-theme/wpsc-shopping_cart_page.php
CHANGED
|
@@ -82,7 +82,7 @@ endif;
|
|
| 82 |
if(wpsc_uses_coupons()): ?>
|
| 83 |
|
| 84 |
<?php if(wpsc_coupons_error()): ?>
|
| 85 |
-
<tr class="wpsc_coupon_row wpsc_coupon_error_row"><td><?php _e('Coupon is not valid.', 'wpsc'); ?></td></tr>
|
| 86 |
<?php endif; ?>
|
| 87 |
<tr class="wpsc_coupon_row">
|
| 88 |
<td colspan="2"><?php _e('Enter coupon code', 'wpsc'); ?> :</td>
|
|
@@ -442,7 +442,7 @@ endif;
|
|
| 442 |
<?php if(wpsc_has_tnc()) : ?>
|
| 443 |
<tr>
|
| 444 |
<td colspan='2'>
|
| 445 |
-
<label for="agree"><input id="agree" type='checkbox' value='yes' name='agree' /> <?php printf(__("I agree to
|
| 446 |
</td>
|
| 447 |
</tr>
|
| 448 |
<?php endif; ?>
|
| 82 |
if(wpsc_uses_coupons()): ?>
|
| 83 |
|
| 84 |
<?php if(wpsc_coupons_error()): ?>
|
| 85 |
+
<tr class="wpsc_coupon_row wpsc_coupon_error_row"><td colspan="6"><?php _e('Coupon is not valid.', 'wpsc'); ?></td></tr>
|
| 86 |
<?php endif; ?>
|
| 87 |
<tr class="wpsc_coupon_row">
|
| 88 |
<td colspan="2"><?php _e('Enter coupon code', 'wpsc'); ?> :</td>
|
| 442 |
<?php if(wpsc_has_tnc()) : ?>
|
| 443 |
<tr>
|
| 444 |
<td colspan='2'>
|
| 445 |
+
<label for="agree"><input id="agree" type='checkbox' value='yes' name='agree' /> <?php printf(__("I agree to the <a class='thickbox' target='_blank' href='%s' class='termsandconds'>Terms and Conditions</a>", "wpsc"), site_url("?termsandconds=true&width=360&height=400")); ?> <span class="asterix">*</span></label>
|
| 446 |
</td>
|
| 447 |
</tr>
|
| 448 |
<?php endif; ?>
|
wpsc-theme/wpsc-user-log.php
CHANGED
|
@@ -144,7 +144,7 @@ global $files, $separator, $purchase_log, $col_count, $products, $links; ?>
|
|
| 144 |
|
| 145 |
<?php _e( 'You must be logged in to use this page. Please use the form below to login to your account.', 'wpsc' ); ?>
|
| 146 |
|
| 147 |
-
<form name="loginform" id="loginform" action="<?php
|
| 148 |
<p>
|
| 149 |
<label><?php _e( 'Username:', 'wpsc' ); ?><br /><input type="text" name="log" id="log" value="" size="20" tabindex="1" /></label>
|
| 150 |
</p>
|
| 144 |
|
| 145 |
<?php _e( 'You must be logged in to use this page. Please use the form below to login to your account.', 'wpsc' ); ?>
|
| 146 |
|
| 147 |
+
<form name="loginform" id="loginform" action="<?php echo wp_login_url(); ?>" method="post">
|
| 148 |
<p>
|
| 149 |
<label><?php _e( 'Username:', 'wpsc' ); ?><br /><input type="text" name="log" id="log" value="" size="20" tabindex="1" /></label>
|
| 150 |
</p>
|
