Skip to content

Instantly share code, notes, and snippets.

View Marigno's full-sized avatar
💻
Building

Diego Marigno Marigno

💻
Building
View GitHub Profile

WP All Import - IF/ELSE statement examples

Here are some example WP All Import [IF] statements. The criteria for an IF statment is written in XPath 1.0 syntax and can use XPath functions. Although powerful, XPath syntax can be quite complex. In many cases it might be easier to use a PHP function as shown here.

The [ELSE]<something> part is optional

Number is equal to:

[IF({price[.=0]})]Zero[ELSE]Not Zero[ENDIF]

@Marigno
Marigno / Import Types.md
Last active December 16, 2020 14:14 — forked from mbissett/Import Types.md
WP All Import - Import Types

A description of import types

  • New Items Import -

This is primarily used to create and manage records. It keeps internal track of the records that it imports, which means that it can later update/create/delete records as they're changed/added/removed in your import file. It's also the only import type that can add/remove variations for variable products.

One limitation of new items imports is that cannot detect/update records that it didn't previously create.

@Marigno
Marigno / link-products-without-sku-to-orders.md
Last active March 7, 2022 20:32
Link products without SKU to orders