tweaks
This commit is contained in:
parent
7a0167d494
commit
5678286dfa
|
@ -536,7 +536,6 @@ function woocommerce_process_product_meta( $post_id, $post ) {
|
||||||
WHERE $wpdb->posts.post_type = 'product'
|
WHERE $wpdb->posts.post_type = 'product'
|
||||||
AND $wpdb->posts.post_status = 'publish'
|
AND $wpdb->posts.post_status = 'publish'
|
||||||
AND $wpdb->postmeta.meta_key = '_sku' AND $wpdb->postmeta.meta_value = '%s'
|
AND $wpdb->postmeta.meta_key = '_sku' AND $wpdb->postmeta.meta_value = '%s'
|
||||||
);
|
|
||||||
", $new_sku))
|
", $new_sku))
|
||||||
) :
|
) :
|
||||||
$woocommerce_errors[] = __('Product SKU must be unique.', 'woocommerce');
|
$woocommerce_errors[] = __('Product SKU must be unique.', 'woocommerce');
|
||||||
|
|
|
@ -13,6 +13,8 @@
|
||||||
function woocommerce_import_start() {
|
function woocommerce_import_start() {
|
||||||
global $wpdb;
|
global $wpdb;
|
||||||
|
|
||||||
|
if (!isset($_POST['import_id'])) return;
|
||||||
|
|
||||||
$id = (int) $_POST['import_id'];
|
$id = (int) $_POST['import_id'];
|
||||||
$file = get_attached_file( $id );
|
$file = get_attached_file( $id );
|
||||||
|
|
||||||
|
|
|
@ -475,6 +475,8 @@ function woocommerce_checkout_action() {
|
||||||
exit;
|
exit;
|
||||||
endif;
|
endif;
|
||||||
|
|
||||||
|
if (!defined('WOOCOMMERCE_CHECKOUT')) define('WOOCOMMERCE_CHECKOUT', true);
|
||||||
|
|
||||||
$woocommerce_checkout = $woocommerce->checkout();
|
$woocommerce_checkout = $woocommerce->checkout();
|
||||||
$woocommerce_checkout->process_checkout();
|
$woocommerce_checkout->process_checkout();
|
||||||
|
|
||||||
|
|
|
@ -122,8 +122,8 @@ add_action( 'init', 'woocommerce_add_to_cart_action' );
|
||||||
add_action( 'wp_login', 'woocommerce_load_persistent_cart', 1, 2);
|
add_action( 'wp_login', 'woocommerce_load_persistent_cart', 1, 2);
|
||||||
|
|
||||||
/* Checkout Actions */
|
/* Checkout Actions */
|
||||||
add_action( 'init', 'woocommerce_checkout_action' );
|
add_action( 'init', 'woocommerce_checkout_action', 10 );
|
||||||
add_action( 'init', 'woocommerce_pay_action' );
|
add_action( 'init', 'woocommerce_pay_action', 10 );
|
||||||
|
|
||||||
/* Login and Registration */
|
/* Login and Registration */
|
||||||
add_action( 'init', 'woocommerce_process_login' );
|
add_action( 'init', 'woocommerce_process_login' );
|
||||||
|
|
Loading…
Reference in New Issue