• Resolved embercide

    (@embercide)


    My CSV has a column named “image uploaded” with YES/NO as a value for each product, I’d like to use this to determine if the product is displayed or hidden in woocommerce (nothing worse than a page of new products and no images!)

    In the past I’ve been able to use php to replace strings, so changing ‘NO’ to ‘hidden’ I can probably manage, but xpath is new and I’m a bit lost

    Thanks in advance

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author WP All Import

    (@wpallimport)

    Hi @embercide

    The “Set with XPath” option can accept import elements (which are XPath elements), static text, or even PHP functions. So, if you already know how to fix the values with a PHP function, you can use that in the “Set with XPath” field. Example:

    [str_ireplace(array("NO","YES"),array("hidden","visible"),{imageuploaded[1]})]

    Thread Starter embercide

    (@embercide)

    Incredible support as usual. Thank you!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Help using xpath to set product visibility status’ is closed to new replies.