WP Table Context

Write a custom select query to get values out of the WP database, and then turn each item into a value for an Amazon catalog.

When to use?

If you have special values in the WP database that you would like to use as catalog values. Maybe you want to query a quiz table to get all the quiz names, or something similar.

How to use?

  1. Under Entity name, enter the name of the entity you wish to "override" with the catalog values. Make sure you create a dummy entity with the same name in the entity editor beforehand. You do not have to add any values to it, since it will be replaced with the catalog.
  2. Enter a SELECT query under the Query field. Note that you are able to use public fields and method from the global wpdb object, such as wpdb.prefix.
  3. Final value is what you will turn each query row into. After the query has been executed and if rows are found, each row will be iterated over and you need to provide an expression that will turn each row into a SINGLE STRING VALUE. You are provided every row under the row name. So if you want to access something like the ID of each row, you can use row.ID.