LLMS_Order::set_date( string $date_key, string $date_val )

Date field setter for date fields that require things to be updated when their value changes


Description Description

This is mainly used to allow updating dates which are editable from the admin panel which should trigger additional actions when updated.

Settable dates: date_next_payment, date_trial_end, date_access_expires.


Top ↑

Parameters Parameters

$date_key

(string) (Required) Date field to set.

$date_val

(string) (Required) Date string or a unix time stamp.


Top ↑

Source Source

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

					'source_description' => '',
					'transaction_id'     => '',
					'status'             => 'llms-txn-succeeded',
					'payment_gateway'    => $this->get( 'payment_gateway' ),
					'payment_type'       => 'single',
				),
				$data
			)
		);

		$txn = new LLMS_Transaction( 'new', $this->get( 'id' ) );

		$txn->set( 'api_mode', $this->get( 'gateway_api_mode' ) );
		$txn->set( 'amount', $amount );
		$txn->set( 'currency', $this->get( 'currency' ) );
		$txn->set( 'gateway_completed_date', date_i18n( 'Y-m-d h:i:s', strtotime( $completed_date ) ) );
		$txn->set( 'gateway_customer_id', $customer_id );
		$txn->set( 'gateway_fee_amount', $fee_amount );
		$txn->set( 'gateway_source_id', $source_id );
		$txn->set( 'gateway_source_description', $source_description );
		$txn->set( 'gateway_transaction_id', $transaction_id );
		$txn->set( 'order_id', $this->get( 'id' ) );
		$txn->set( 'payment_gateway', $payment_gateway );
		$txn->set( 'payment_type', $payment_type );
		$txn->set( 'status', $status );

		return $txn;


Top ↑

Changelog Changelog

Changelog
Version Description
3.19.0 Unknown.
3.10.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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