This commit is contained in:
Mike Jolley 2012-03-07 20:12:19 +00:00
parent 7a0167d494
commit 5678286dfa
4 changed files with 6 additions and 3 deletions

View File

@ -536,7 +536,6 @@ function woocommerce_process_product_meta( $post_id, $post ) {
WHERE $wpdb->posts.post_type = 'product'
AND $wpdb->posts.post_status = 'publish'
AND $wpdb->postmeta.meta_key = '_sku' AND $wpdb->postmeta.meta_value = '%s'
);
", $new_sku))
) :
$woocommerce_errors[] = __('Product SKU must be unique.', 'woocommerce');

View File

@ -13,6 +13,8 @@
function woocommerce_import_start() {
global $wpdb;
if (!isset($_POST['import_id'])) return;
$id = (int) $_POST['import_id'];
$file = get_attached_file( $id );

View File

@ -475,6 +475,8 @@ function woocommerce_checkout_action() {
exit;
endif;
if (!defined('WOOCOMMERCE_CHECKOUT')) define('WOOCOMMERCE_CHECKOUT', true);
$woocommerce_checkout = $woocommerce->checkout();
$woocommerce_checkout->process_checkout();

View File

@ -122,8 +122,8 @@ add_action( 'init', 'woocommerce_add_to_cart_action' );
add_action( 'wp_login', 'woocommerce_load_persistent_cart', 1, 2);
/* Checkout Actions */
add_action( 'init', 'woocommerce_checkout_action' );
add_action( 'init', 'woocommerce_pay_action' );
add_action( 'init', 'woocommerce_checkout_action', 10 );
add_action( 'init', 'woocommerce_pay_action', 10 );
/* Login and Registration */
add_action( 'init', 'woocommerce_process_login' );