Showcasing WooCommerce Up-sells
Create a query to display WooCommerce Up-sell products on the WordPress Single Product page with the help of the JetEngine plugin.
Up-sells is a Woocommerce default field. You can check it in the _postmeta table. The field key is ‘_upsell_ids’
Please follow the instructions below:
Create a Query with the Query Builder
Go to WordPress Dashboard > JetEngine > Query Builder and create a new Query.
Please note that you can build Posts Query and WC Query; it works either way.
Give your new query a Name and choose the Query Type – “Posts Query”. All the settings will depend on the Query Type you have chosen. Let’s take a closer look at the setup.
Select the Post Type — “Products”:
In the Post In field, you should select the “Current meta value as a string” macro. With this macro, you can get comma-separated values from fields that contain arrays. You can use it with multiple select options.
Additionally, press the “Advanced settings” button to set the context.
Here, we define the Context if needed and complete the Fallback field with the title we want to show whenever there are no products found.
Then, press the “Back” button to return to the general settings menu and save the changes by hitting the “Apply” button.
Place the Product Grid Widget to the Single Product Template and Use the Custom Query
Then you can enable the Carousel and play with the settings:
Note, you can use any widget where you can enable Custom Query: Listing Grid or Products Grid.
Result:
There you go; now you can showcase WooCommerce Up-sells products on your WordPress website by using the JetEngine plugin.