-
Notifications
You must be signed in to change notification settings - Fork 2
JetEngine extra Macros
Returns the ID of the products that the currently logged in user has purchased. Only calculates from completed orders. (With comma separation.)
Use in the Query Builder: Create a new Query in the Query builder. The Query Type should be Wc Product Query. In the general section, in Includes, select this macro: WC Current User Purchased Products

A single macro that completely covers product listing (archive type) using Query Builder. With this macro, the listing grid, 8or any widget with a query builder query), when placed on the shop page (template) or on the archive page, will display the products accordingly.
The Query Type set to WC Product Query. In the general section navigate the Include section, and use the WC Loop Products macro

(Only if you have Woo Membership plugin installed) https://woo.com/products/woocommerce-memberships/ Returns the ID of the posts to which the user has access. These are retrieved via the Woo Membership API. (With comma separation.)
Use in the Query Builder:
Create a new Query in the Query builder.
The Query Type should be Post Query. Navigate to the Post & Page section. In the Post In input, select this macro: WC Membership Access Posts
In this Macro, you have to choose from which Membership you want the user to retrieve the available posts.

(Only if you have Woo Membership plugin installed) https://woo.com/products/woocommerce-memberships/
This macro considers all active memberships of the current user and returns the posts configured within those memberships. It is not limited by post type; all posts specified in the membership are returned. The difference between this and WC Membership Access Posts is that it does not check only a selected membership, but iterates through all active memberships.
Use in the Query Builder: Create a new Query in the Query builder. The Query Type should be Post Query. Navigate to the Post & Page section. In the Post In input, select this macro: WC Membership Access All Posts
Note that this will return all post types, so if you want to limit it, don't forget to set Query to return only post types.
(Only if you have Woo Membership plugin installed) https://woo.com/products/woocommerce-memberships/
This macro returns all products available to the user, based on their active memberships. You can configure it to return only purchasable products, view-only products, or both types.
Use in the Query Builder: Create a new Query in the Query builder. The Query Type should be Post Query. Navigate to the Post & Page section. In the Post In input, select this macro: WC Membership Access All Products
(Only if you have Woo Membership plugin installed) https://woo.com/products/woocommerce-memberships/
This macro similarly returns all products from the user's active memberships that are eligible for membership discounts. It only includes products that are actively enabled within the memberships.
Use in the Query Builder: Create a new Query in the Query builder. The Query Type should be Post Query. Navigate to the Post & Page section. In the Post In input, select this macro: WC Membership Discounted Products
(Only if you have Woo Membership plugin installed)
Returns the membership plans of the currently logged in user. You can choose to include all or a specific status. It will only not add plans that it does not have. If you choose Any status it doesn't matter if it's expired or suspended, it will return the ID.
How to use and combine with the Query builder and listing grid?
- 1, Create a new Query. Query type: Post
- 2, In the general section Post type selection choose Members (this is the name of one of woocommerce's membership CPTs.)
- 3, In the general section, Post status select: Any. (Since there are special statuses here, the macro will filter it.)
- 4, In the Post & page section the Post In input select the WC Current User Active Memberships macro, and choose the membership status.
- 5, Done!

Go to the JetEngine Listing - and create a new listing, you can use for the source Post, or Query builder (With the previously created Query with query builder.) It's funny, because actually whatever you choose the data comes out fine, the preview can be a problem, but it's safest either if the source is the query builder, but if post then Members (as set in the query builder)
You may not see some data correctly in the preview, but don't be scared.
To retrieve the data, use the Current membership Data dynamic tag.
The data that can be retrieved using the dynamic tag: Plan name, Next bill (if use subscriptions), status, member since, Expires, remaning time
If you want to hide a piece of data from the current membership data when the memberhsip has expired, you can use our extra jetengine dynamic visibility condition : Current Membership Expired
Using the following macros in Query Builder is the most recommended, but does not exclude other options.
- LD User Courses
- LD Course Access Type Query
- LD Course Prerequisites Query
- LD User Groups
In the query builder, set the post type to course, then navigate to the Post & Page section. For the Post in option, click on the dynamic label and select LD User Courses macro from the list.

What is important to know is that it always tries to retrieve courses related to the current user. In the extra select field, you can choose to list all the ones it has, only the ones it has in progress (i.e. not yet completed), or only the ones it has completed.
In the query builder, set the post type to course, then navigate to the Post & Page section. For the Post in option, click on the dynamic label and select LD Course Access Type Query macro from the list.
Here you can query for courses by access type(s). You can also use the jetsmartfilter + Query Builder combination to create your own filter with the access types.
In the query builder, set the post type to course, then navigate to the Post & Page section. For the Post in option, click on the dynamic label and select LD Course Prerequisites Query macro from the list.
This is very interesting. If you place the display, for example the lisitng grid on the course single page, and if you have a prerequisite set for the add course (you need to complete one of the courses), it will list them (you can also retrieve this with a dynamic tag)
In the query builder, set the post type to course, then navigate to the Post & Page section. For the Post in option, click on the dynamic label and select LD User Groups macro from the list.
This macro returns all the groups the current user has accessed, enrolled in.