Filter Exported WordPress Data
You can configure your filters in the Add Filtering Options section, available when creating and editing exports. If we wanted to export all of our WooCommerce products that cost less than $10, we would select first Price as our element to filter by. Then for our rule, we would select less than, with 10 for our value.
With these filters, you can easily do things like export:
- Every WooCommerce order over $100
- Users who have registered in the last week
- All of the green shirts in your WooCommerce store
- Every page created by a certain user
- All of the posts written in 2014
Step 1: Select an Element
Select the element that you want to filter your exported records by. Available elements will change when you export different types of data. You can select any data associated with the records you are exporting, like:
- Date
- Title
- Price
- Order Total
- Address
- Author
- Categories and tags
- Custom fields
- Any exportable data
Step 2: Add a Rule
Select which comparison rule you want to use with your filter. You can use any of the following rules, depending on what the selected element allows:
- equals
- doesn't equal
- greater than
- equal to or greater than
- less than
- equal to or less than
- contains
- doesn't contain
- is empty
- is not empty
Step 3: Enter a Value
Input the value to filter your data by. You should input values that follow the same format as the element selected in Step 1.
Some rules may not need a value, such as the is empty rule.
Once you're done, click Add Rule to apply your new filtering rule. You can add as many filtering rules as required. After that, only records matching your specified rules will be exported.
Adding Multiple Rules
You can add as many rules as you like. Use the AND or OR operators to specify how rules should interact with each other.
When your export runs again, WP All Export will rebuild your export file based on your filter rules.
Filter Export Data Advanced Topics
Filtering By Date and Relative Dates
When exporting data that contains dates, you can most certainly use relative dates.
For example, to export a subset of your WooCommerce orders, first expand the Add Filtering Options panel near the bottom of the New Export screen.
Then, set a filter by selecting an Element, a Rule, and a Value:
In this case, we are setting:
Element = Order Date
Rule = equal to or newer than
Value = 01/01/2018
This is equivalent to saying, “Export WooCommerce orders with an order date equal to or newer than January 01, 2018.”
You can also combine multiple filter rules. Let's say that you want to only export orders from last month, you can use these rules:
Since these are relative date rules, you won't have to update them monthly. Learn about the syntax you can use in date filters here: https://www.php.net/manual/en/datetime.formats.php#datetime.formats.relative.
Filter with Multiple Values (Taxonomies and Attributes)
When the Element selected to filter is a taxonomy or an attribute, the only two rules available are: In and Not In. Let's say you're filtering by Product categories, you would have In Product Cat and Not In Product Cat available:
With such rules, you can provide multiple values separated by a comma.
For example, you can export WooCommerce products and set up the filter to only export products that are in the categories Classic, Large, and Extra Large. You can input multiple categories separated by commas, like so:
Filtering WooCommerce Product Export by Product Visibility (also known as Catalog Visibility)
The following instructions only apply when you export WooCommerce products via WP All Export.
While you see Shop and search results or Hidden when assigning the product's catalog visibility, the data stored by WooCommerce is a bit different than what you would expect.
To filter by the desired catalog visibility, a pair of filters must be assigned. Here's a list of the filters you would need to set up for each case:
Shop and search results:
- Product Visibility › Not In Product Visibility › exclude-from-search
- Product Visibility › Not In Product Visibility › exclude-from-catalog
Shop only:
- Product Visibility › In Product Visibility › exclude-from-search
- Product Visibility › Not In Product Visibility › exclude-from-catalog
Search results only:
- Product Visibility › In Product Visibility › exclude-from-catalog
- Product Visibility › Not In Product Visibility › exclude-from-search
Hidden:
- Product Visibility › In Product Visibility › exclude-from-search
- Product Visibility › In Product Visibility › exclude-from-catalog
Related Docs
Create more complex filters using WP_Query.
Integrate WP All Export with countless apps and services using Zapier.
Execute custom code to modify the export data on the fly.
Learn about WP All Export's API and hooks.