SKU sorting in admin
This commit is contained in:
parent
429e7ea1f3
commit
2ea44118ee
|
@ -280,7 +280,8 @@ function woocommerce_custom_product_orderby( $vars ) {
|
|||
endif;
|
||||
if ( 'sku' == $vars['orderby'] ) :
|
||||
$vars = array_merge( $vars, array(
|
||||
'orderby' => 'id'
|
||||
'meta_key' => '_sku',
|
||||
'orderby' => 'meta_value'
|
||||
) );
|
||||
endif;
|
||||
endif;
|
||||
|
|
|
@ -514,7 +514,9 @@ function woocommerce_process_product_meta( $post_id, $post ) {
|
|||
// Unique SKU
|
||||
$sku = get_post_meta($post_id, '_sku', true);
|
||||
$new_sku = esc_html(stripslashes( $_POST['_sku'] ));
|
||||
if ($new_sku!==$sku) :
|
||||
if ($new_sku=='') :
|
||||
update_post_meta( $post_id, '_sku', '' );
|
||||
elseif ($new_sku!==$sku) :
|
||||
if ($new_sku && !empty($new_sku)) :
|
||||
if (
|
||||
$wpdb->get_var($wpdb->prepare("
|
||||
|
|
|
@ -145,6 +145,7 @@ Yes you can! Join in on our [GitHub repository](http://github.com/woothemes/wooc
|
|||
* Bulk edit products
|
||||
* Added basic API for payment gateways to hook into (for IPN etc)
|
||||
* Added Bulgarian translation
|
||||
* Fixed SKU sort in admin
|
||||
|
||||
= 1.4.4 - 18/02/2012 =
|
||||
* Fix for remove coupon links after ajax update of shipping
|
||||
|
|
Loading…
Reference in New Issue