Choosing which Products to import on WooCommerce
Platforms:
Per standard, Clerk.io’s WooCommerce plugin only imports Published products.
This can be changed if needed.
The following file controls which products are imported to Clerk.io:
wp-content->plugins->clerkio->includes->class-clerk-rest-api.php.
In the file, locate the function called product_endpoint_callback.
In the $products list, under ‘status’ simply add any Status that you want to include, separated by commas:
If you do this, we strongly recommend that you also add an extra attribute to this file, which indicates when a product is not saleable, so you can show it in your Design.
Assuming you create an attribute called is_saleable which is either true or false, you can use it like this in Designs:
{% raw %}
{% if product.is_saleable %}
<div class="in-stock">In Stock</div>
{% else %}
<div class="not-in-stock">Not In Stock</div>
{% endif %}
{% endraw %}
Then go to my.clerk.io -> Data and click Start New Sync to import the new products.