# learnpress/4.1.7.3/inc/background-process/class-lp-background-single-order.php

LearnPress – WordPress LMS Plugin for Create and Sell Online Courses, version 4.1.7.3. 54 lines.

- Page: https://pluginprobe.com/plugins/learnpress/4.1.7.3/code/inc/background-process/class-lp-background-single-order.php
- Raw: https://pluginprobe.com/plugins/learnpress/4.1.7.3/raw/inc/background-process/class-lp-background-single-order.php
- Modified: 2022-11-02T07:32:08+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/learnpress/4.1.7.3/code/inc/background-process/class-lp-background-single-order.php#L10-L20`.

```php
<?php
/**
 * Class LP_Background_Single_Course
 *
 * Single to run not schedule, run one time and done when be call
 *
 * @since 4.1.4
 * @author tungnx
 * @version 1.0.0
 */
defined( 'ABSPATH' ) || exit;

if ( ! class_exists( 'LP_Background_Order' ) ) {
	class LP_Background_Single_Order extends LP_Async_Request {
		protected $action = 'background_single_order';
		protected static $instance;

		/**
		 * @var $lp_order LP_Order
		 */
		protected $lp_order;

		/**
		 * Get params via $_POST and handle
		 */
		protected function handle() {

		}

		/**
		 * Save course post data
		 *
		 * @throws Exception
		 */
		protected function save_post() {

		}

		/**
		 * @return LP_Background_Single_Order
		 */
		public static function instance(): self {
			if ( is_null( self::$instance ) ) {
				self::$instance = new self();
			}

			return self::$instance;
		}
	}

	// Must run instance to register ajax.
	LP_Background_Single_Order::instance();
}

```
