Product variations not showing i correct order in the admin panel (2 posts)

  1. andieje999
    Posted 2 years ago #


    Please can you advise how woocommerce orders the product variations in the admin panel. I thought they would be ordered in terms of the product variation id (i.e. the number you see with a hash when you add a new variation). However my product variations are not being added in this order.

    I cannot see a setting for how to order the variations.

    If there isnt a setting please can you advise where in the plugin source files the variations are retrieved from the database and ordered so that I can make sure they are ordered by id

    Thanks a lot


  2. andieje999
    Posted 2 years ago #

    I did this and it seemed to work
    `// Get variations
    $args = array(
    'post_type' => 'product_variation',
    'post_status' => array( 'private', 'publish' ),
    'numberposts' => -1,
    'orderby' => 'id',
    'order' => 'asc',
    'post_parent' => $post->ID

    Is this correct?

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WooCommerce
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic