Undefined variable: variant

WooCommerce : Undefined variable: variant

Issue:

There is a SKU on the order that does not exist in Stock2Shop.

Applies to:

woocommerce

Solution:

You need to identify the SKU before deciding what action to take.

How to find the offending SKU:

  • Log in to the Stock2Shop console.
  • Navigate to Queue > View.
  • Click on the 3 dots of the error > Click View Item.
  • Scroll down in the grey block and look for:
"SKU": "xyz"
  • Search each SKU in the Stock2shop console (Products > View) to find which SKU is causing the error. The offending SKU will not be found in Stock2Shop.

Note, look through all the SKUs on the order to ensure there is not more than one causing errors.

Correcting missing SKUs:

  • Once you have found which SKU is not syncing to Stock2Shop, confirm if the SKU should be syncing from your ERP / accounting system.
  • Mark the SKU as active to sync using your Stock2Shop Active field in the ERP / accounting system.
  • Wait for the product to sync through to Stock2Shop and link to the channel.
  • Navigate to the queue error and click “Try Again”.