Product Emulation

Intro #

  • Path: WooCommerce > Settings > Products, then scroll down to Enable product emulation.

Why does this Setting exist? #

It is important to remember that a Quick Manual Product is used to add a product to an order that is not in the product Catalogue. This allows us to save plenty of time.

It is therefore a very quick way to add a line item directly to an order. Since this newly added product it is not an actual product, this could cause issues in certain situations.

Product emulation allows us to turn this invalid order object into an actual order item product.

Manual products are only accessible in the context of a WooCommerce order, as an order item. Due to this, attempting to read the product data (such as SKU, Dimensions, etc) results in a crash if certain products that are deleted from the WooCommerce catalog are still present in legacy orders.

Use-cases #

The Product Emulation Setting loads a standard simple product and injects the Item Name, Price and SKU.

Product Emulation can be useful:

  • To potentially deal with cases involving Payment Gateway crashes.
  • To extend manual products to have Weight, Dimensions or even Thumbnails.
  • To allow a Coupon to be added to the order, as those can only be added to valid products.