WooCommerce CSV Import Suite

Uit De Vliegende Brigade
Versie door Jeroen Strompf (overleg | bijdragen) op 26 mei 2022 om 12:38 (→‎order_number_formatted reset)
(wijz) ← Oudere versie | Huidige versie (wijz) | Nieuwere versie → (wijz)
Naar navigatie springen Naar zoeken springen

De complete naam van de plugin is WooCommerce Customer/Order/Coupon CSV Import Suite.

Use case

  • Dit artikel betreft een use case omtrent migratie van klanten en orders van een bronsite naar een lege doelsite. Het gaat dus niet om het samenvoegen (merging) van gegevens
  • Belangrijk dat de oorspronkelijke formatted order number behouden blijft. Dat zijn order-id's zoals nl_en-12345. Het numerieke gedeelte daarvan is het post-ID. Dat mag na import veranderen, zolang het formatted order number behouden blijft.

Order import

Some notes:

  • The header has to be on the first row. The WooCommerce CSV Export-plugin seems to generate files with the first two rows being empty. That needs to be corrected before import. When failing to do so, there will be no sample data on the second (?) page of the import process

Order import - Issues

On the left the original order. On the right the imported order. There are several issues, although not all equally significant. Together, they are quite problematic: (1) Order-ID has changed (2) Payment date has changed (3) IP-address reset - Not relevant (4) A customer-account has been created (5) Some shipment fields removed (6) Dates and content of order notes have been changed

Some specific issues:

order_number reset

The usual order-id gets reset. That is as expected. Doesn't have to be a problem, as long as the order_numer_formatted field can be kept intact.

order_number_formatted reset

It's ok that order_number gets reset, as long as order_number_formatted remains. Unfortunately, that doesn't seem to be the case. I'm not sure if this is acceptable for the use case I have in mind.

As a test, I've changed the content of this field within the database, but it didn't change within the order. Maybe this field is derived real-time from the order-id?

Plugin-documentation (https://woocommerce.com/document/customer-order-csv-import-suite/#custom-order-numbers):

Custom order numbers are a tricky subject and deserve special mention. Due to the 
implementation of WooCommerce, which uses the underlying post_id for the order number by
default, it’s not possible to directly set the ID for an order without migrating database
tables directly. As a workaround, the CSV Import Suite will automatically add an order
note containing the original order_number / order_number_formatted if one is provided. In
addition, any specified order_number / order_number_formatted will also be set as special
meta data on the order.

This meta data can be used by a compatible custom order number plugin like the 
Sequential Order Numbers Pro or (free) Sequential Order Numbers plugins.
With Sequential Order Numbers Pro installed, your imported order numbers will work 
seamlessly: the order numbers will be displayed both in the admin and frontend, but even
without a compatible custom order number plugin you can always view your historical order
numbers in the notes section for each order.

What I think this says:

  • order_number_formatted is as inflexible as order_number
  • You can decouple order_number from post_id using one of several plugins.

Order notes reset

The order notes are reset: All dates get reset to the moment of import. This means that these notes are not reliable anymore. That might be problematic as there is no reliable data trail anymore.

Part of the order-input-file (created by WooCommerce CSV Export-plugin). Note that no time-stamps or actors are included. Maybe the problem is with the WooCommerce CSV Export-plugin

Payment info reset

Payment info reset: The payment date is reset to the moment of import, which means that there is no paper trail anymore.

VAT-number not imported

This may not be a major issue, but something I want to mention as it doesn't appear in the screenshot above: I coulnd't map vat_number from source to destination, although the destination is an exact clone of the source (except that customers & orders were removed after cloning).

Zie ook

Bronnen