• Resolved AHOiREKLAMA

    (@ahoireklama)


    Hello, I don’t know why, by it looks like my import is overwriting all (not sure if all) product variations with Private status. So, after import they become unavailable to purchase and I have to correct it manually in the database.

    Each product and variation in my import have unique SKU.
    Parent products have SKUs in this format: XXXX
    Child variations have SKUs in this format: XXXX-YYYYYY

    So, in the “Other Product Options” I am setting the Post status with this XPath function:

    [get_product_status({SKU[1]})]

    The function simply checks if the SKU contains a dash symbol. If it does, it is a variation (automatically publish), else it is a product (set as pending):

    function get_product_status($sku) {
      if(strpos($sku, '-') !== false) {
          return 'publish';
      }
      return 'pending';
    }

    However, this only applies for newly created products! I am not doing anything with the post status for updated products, as you can see here: https://prntscr.com/v4aogx

    And by the way, I am setting the ‘Variation enabled’ to ‘Yes’ explicitly, but again, I am not doing anything with the post status on Import update.

    What could be causing my variations to go ‘private’ after import update?

    Thank you

    • This topic was modified 4 years, 1 month ago by AHOiREKLAMA.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘My product variations are updated with Private status’ is closed to new replies.