LLMS_Order

LLMS_Order model class


Description Description


Source Source

File: includes/models/model.llms.order.php


			

Top ↑

Changelog Changelog

Changelog
Version Description
4.7.0 Added plan_ended meta property.
3.35.0 Prepare transaction revenue SQL query properly; Sanitize $_SERVER data.
3.32.0 Update to use latest action-scheduler functions.
3.0.0 Introduced.


Top ↑

Methods Methods

  • add_note — Add an admin-only note to the order visible on the admin panel notes are recorded using the wp comments API & DB
  • after_create — Called after inserting a new order into the database
  • calculate_billing_end_date — Calculate the date when billing should applicable to orders created from plans with a set # of billing intervals
  • calculate_next_payment_date — Calculate the next payment due date
  • calculate_trial_end_date — Calculate the end date of the trial
  • can_be_retried — Determine if the order can be retried for recurring payments
  • can_resubscribe — Determine if an order can be resubscribed to
  • generate_order_key — Generate an order key for the order
  • get_access_expiration_date — Determine the date when access will expire based on the access settings of the access plan at the $start_date of access
  • get_access_status — Get the current status of a student's access based on the access plan data stored on the order at the time of purchase
  • get_action_args — Retrieve arguments passed to order-related events processed by the action scheduler
  • get_coupon_amount — Get the formatted coupon amount with a currency symbol or percentage
  • get_creation_args — An array of default arguments to pass to $this->create() when creating a new post
  • get_customer_name — Retrieve the customer's full name
  • get_gateway — Retrieve the payment gateway instance for the order's selected payment gateway
  • get_initial_price — Get the initial payment amount due on checkout This will always be the value of "total" except when the product has a trial
  • get_last_transaction — Retrieve the last (most recent) transaction processed for the order
  • get_last_transaction_date — Retrieve the date of the last (most recent) transaction
  • get_next_payment_due_date — Retrieve the due date of the next payment according to access plan terms
  • get_next_scheduled_action_time — Retrieve the timestamp of the next scheduled event for a given action
  • get_notes — Get an array of the order notes Each note is actually a WordPress comment
  • get_product — Retrieve an LLMS_Post_Model object for the associated product
  • get_retry_rules — Get configured payment retry rules
  • get_revenue — Gets the total revenue of an order
  • get_start_date — Get the start date for the order gets the date of the first initially successful transaction if none found, uses the created date of the order
  • get_transaction_total — SQL query to retrieve total amounts for transactions by type
  • get_transactions — Retrieve an array of transactions associated with the order according to supplied arguments
  • get_trial_end_date — Retrieve the date when a trial will end
  • get_view_link — Get a link to view the order on the student dashboard
  • has_access — Determine if the student associated with this order has access
  • has_coupon — Determine if a coupon was used
  • has_discount — Determine if there was a discount applied to this order via either a sale or a coupon
  • has_sale — Determine if the access plan was on sale during the purchase
  • has_scheduled_payment — Determine if there's a payment scheduled for the order
  • has_trial — Determine if the order has a trial
  • has_trial_ended — Determine if the trial period has ended for the order
  • init — Initialize a pending order Used during checkout Assumes all data passed in has already been validated
  • is_legacy — Determine if the order is a legacy order migrated from 2.x
  • is_recurring — Determine if the order is recurring or singular
  • maybe_schedule_expiration — Schedule access expiration
  • maybe_schedule_payment — Schedules the next payment due on a recurring order
  • maybe_schedule_retry — Handles scheduling recurring payment retries when the gateway supports them
  • record_transaction — Record a transaction for the order
  • set_date — Date field setter for date fields that require things to be updated when their value changes This is mainly used to allow updating dates which are editable from the admin panel which should trigger additional actions when updated
  • set_status — Update the status of an order
  • start_access — Record the start date of the access plan and schedule expiration if expiration is required in the future
  • unschedule_expiration — Cancels a scheduled expiration action
  • unschedule_recurring_payment — Cancels a scheduled recurring payment action

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.