Fixing SQL syntax in woo.._product_ordering().
Your sql syntax not good, please check my fix. Thanks you. ;] Yakir.
This commit is contained in:
parent
75c37ed2ed
commit
6bc3598586
|
@ -1819,13 +1819,13 @@ function woocommerce_product_ordering() {
|
|||
$nextid = isset( $_POST['nextid'] ) ? $_POST['nextid'] : false;
|
||||
$new_pos = array(); // store new positions for ajax
|
||||
|
||||
$siblings = $wpdb->get_results( $wpdb->prepare("
|
||||
SELECT ID, menu_order FROM %s AS posts
|
||||
WHERE posts.post_type = 'product'
|
||||
AND posts.post_status IN ( 'publish', 'pending', 'draft', 'future', 'private' )
|
||||
AND posts.ID NOT IN (%s)
|
||||
$siblings = $wpdb->get_results( $wpdb->prepare('
|
||||
SELECT ID, menu_order FROM %1$s AS posts
|
||||
WHERE posts.post_type = \'product\'
|
||||
AND posts.post_status IN ( \'publish\', \'pending\', \'draft\', \'future\', \'private\' )
|
||||
AND posts.ID NOT IN (%2$d)
|
||||
ORDER BY posts.menu_order ASC, posts.ID DESC
|
||||
"), $wpdb->posts, $post->ID );
|
||||
', $wpdb->posts, $post->ID) );
|
||||
|
||||
$menu_order = 0;
|
||||
|
||||
|
|
Loading…
Reference in New Issue