Order loop

For loop type lifter_order, here are the available query arguments and fields.

Query arguments

  • author - Include by author ID, login name, or "current"

    Type: string, array

  • category - Include by category ID, slug, or "current"

    Type: string, array

  • child_terms - Set "true" to include child terms for hierarchical taxonomies

    Type: string

  • custom_date_field - Filter by given custom date field - Faster than using "field", this queries raw field values in the database

    Type: string

  • custom_date_field_compare - Compare using one of: "equal" (default), "not", "before", "before_inclusive", "after", "after_inclusive"

    Type: string

  • custom_date_field_format - For custom date field query, specify the date format of the field value - Default is "Ymd"; For date-time field, set "Y-m-d H:i:s". If it's a timestamp, use "timestamp". For custom field plugins other than ACF, you may need to use a different format.

    Type: string

  • custom_date_field_type - For custom date field query, one of: date (default), time, datetime, number

    Type: string

  • custom_date_field_value - Filter by given custom date field value, or "current"

    Type: string

  • custom_field - Filter by given custom field - Faster than using "field", this queries raw field values in the database

    Type: string

  • custom_field_2 - See attribute "custom_field"

    Type: string

  • custom_field_3 - See attribute "custom_field"

    Type: string

  • custom_field_compare - Compare using one of: "equal" (default), "not", "before", "before_inclusive", "after", "after_inclusive"

    Type: string

  • custom_field_compare_2 - See attribute "custom_field_compare"

    Type: string

  • custom_field_compare_3 - See attribute "custom_field_compare"

    Type: string

  • custom_field_type - For custom field query, one of: string (default), number, date, time, datetime

    Type: string

  • custom_field_type_2 - See attribute "custom_field_type"

    Type: string

  • custom_field_type_3 - See attribute "custom_field_type"

    Type: string

  • custom_field_value - Filter by given custom field value

    Type: string

  • custom_field_value_2 - See attribute "custom_field_value"

    Type: string

  • custom_field_value_3 - See attribute "custom_field_value"

    Type: string

  • exclude - Exclude by ID or name

    Type: string, array

  • exclude_author - Exclude by author ID, login name, or "current"

    Type: string, array

  • exclude_category - Exclude by category ID, slug, or "current"

    Type: string, array

  • exclude_parent - Exclude by parent ID or name

    Type: string, array

  • exclude_tag - Exclude by tag ID, slug, or "current"

    Type: string, array

  • fields -

  • has_coupon - If a coupon was used - true/false.

    Type: boolean

  • has_discount - If there was a discount applied to this order via either a sale or a coupon - true/false.

    Type: boolean

  • has_sale - If the access plan was on sale during the purchase - true/false.

    Type: boolean

  • has_scheduled_payment - If there's a payment scheduled for the order - true/false.

    Type: boolean

  • has_trial - If the order has a trial - true/false.

    Type: boolean

  • has_trial_ended - If the trial period has ended for the order - true/false.

    Type: boolean

  • id - ID

    Type: string, array

  • ignore_sticky_posts - Ignore sticky posts

    Default: TRUE
    Type: boolean

  • include - Include by ID or name

    Type: string, array

  • include_children - Include children

    Type: boolean

  • is_recurring - If the order is recurring or singular - true/false.

    Type: boolean

  • name - Name/slug

    Type: string, array

  • order - Order: asc (ascending) or desc (descending)

    Default: asc
    Type: string

  • orderby - Order by one of: id, author, title, name, type, date, modified, random, comment_count, relevance, menu

    Default: title
    Type: string

  • orderby_field - Order by custom field

    Type: string

  • orderby_field_number - Order by custom field whose value is a number

    Type: string

  • page - Page number

    Default: 1
    Type: number

  • paged - Posts per page

    Default: -1
    Type: number

  • parent - Include by parent ID or name

    Type: string, array

  • product - Product ID or "current" for current product where the order is assigned.

    Type: string

  • publish_compare - Publish date comparison - One of: "before", "before_inclusive", "after", "after_inclusive"

    Type: string

  • publish_date - Filter by publish date in Y-M-D format, "today", "X days ago" and other values compatible with strtotime() - Optionally use "publish_compare" attribute

    Type: string

  • publish_day - Filter by given publish day of the month, from 1 to 31, or "current"

    Type: number

  • publish_month - Filter by given publish month, from 1 to 12, or "current"

    Type: number

  • publish_week - Filter by given publish week, from 1 to 54, or "current" - Note: the "publish_compare" attribute is not supported for this field

    Type: number

  • publish_year - Filter by given publish year, or "current"

    Type: number

  • search - Search by given keyword - Prepending a keyword with a hyphen "-" will exclude posts matching it

    Type: string

  • status - Order status: llms-completed, llms-active, llms-expired, llms-on-hold, llms-pending-cancel, llms-pending, llms-cancelled, llms-refunded, llms-failed. If not specified returns orders of all statuses

    Default: ["llms-completed","llms-active","llms-expired","llms-on-hold","llms-pending-cancel","llms-pending","llms-cancelled","llms-refunded","llms-failed"]
    Type: string, array

  • tag - Include by tag ID, slug, or "current"

    Type: string, array

  • taxonomy - Include by taxonomy ID, slug, or "current" for taxonomy archive
    Use with "term" and "taxonomy_compare" attributes

    Type: string, number

  • taxonomy_2 - See attribute "taxonomy"

    Type: string, number

  • taxonomy_3 - See attribute "taxonomy"

    Type: string, number

  • taxonomy_compare - One of "in" (default), "not", "and", "exists", and "not exists"
    Use with "taxonomy" attribute

    Type: string

  • taxonomy_compare_2 - See attribute "taxonomy_compare"

    Type: string

  • taxonomy_compare_3 - See attribute "taxonomy_compare"

    Type: string

  • taxonomy_relation - When using more than one "taxonomy" queries, can specify "and" or "or"

    Type: string

  • terms - Include by taxonomy term ID, slug, or "current"
    Use with "taxonomy" attribute

    Type: string, number, array

  • terms_2 - See attribute "terms"

    Type: string, number, array

  • terms_3 - See attribute "terms"

    Type: string, number, array

  • type - Post type(s)

    Default: post
    Type: string, array

  • user - User ID or "current" for current user.

    Type: string

Fields

  • access_expiration_date - Determine the date when access will expire
  • access_status - Get the current status of a student's access - 'inactive', 'expired', 'active'
  • billing_address_1 - Billing address_1
  • billing_address_2 - Billing address_2
  • billing_city - Billing city
  • billing_country - Billing country
  • billing_cycle - Billing cycle
  • billing_email - Billing email
  • billing_first_name - Billing first name
  • billing_frequency - Billing frequency
  • billing_last_name - Billing last name
  • billing_period - Billing period
  • billing_phone - Billing phone
  • billing_state - Billing state
  • billing_zip - Billing zip
  • coupon_amount - Formatted coupon amount with a currency symbol or percentage
  • coupon_amount_regular - Order coupon amount
  • coupon_amount_trial - Order coupon trial amount
  • coupon_value_trial - Order coupon trial value
  • customer_name - Customer's full name
  • gateway - Payment gateway instance for the order's selected payment gateway
  • gateway_title - Payment gateway title
  • has_coupon - If a coupon was used - true/false
  • has_discount - If there was a discount applied to this order - true/false
  • has_sale - If the access plan was on sale during the purchase - true/false
  • has_scheduled_payment - If there's a payment scheduled for the order - true/false
  • has_trial - If the order has a trial - true/false
  • has_trial_ended - If the trial period has ended for the order - true/false
  • id - Order ID
  • initial_price - Initial payment amount due on checkout - value of "total" except when the product has a trial
  • is_recurring - If the order is recurring - true/false
  • last_transaction_date - Date of the last (most recent) transaction
  • next_payment_date - Due date of the next payment according to access plan terms
  • original_total - Order original total
  • plan_title - Access plan title
  • product_id - Order product id
  • product_link - Order product link
  • product_title - Order product title
  • sale_price - Order sale price
  • start_date - Date of the first initially successful transaction - if none found, uses the created date of the order
  • status - Order llms status
  • status_name - Order status name
  • total - Total
  • transactions - Order transactions list loop- 'id', 'status', 'status_name', 'date', 'refund_amount', 'amount', 'net_amount', 'gateway_source_description', 'pages'
  • trial_end_date - Date when a trial will end
  • trial_length - Trial length
  • trial_original_total - Trial original total
  • trial_period - Trial period
  • trial_total - Trial total
  • view_link - Link to view the order on the student dashboard