LLMS_Transaction::get_creation_args( int $order_id )

An array of default arguments to pass to $this->create() when creating a new post


Description Description


Parameters Parameters

$order_id

(int) (Required) LLMS_Order ID of the related order


Top ↑

Return Return

(array)


Top ↑

Source Source

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

	protected function get_creation_args( $order_id = 0 ) {

		$title = sprintf( __( 'Transaction for Order #%1$d – %2$s', 'lifterlms' ), $order_id, strftime( _x( '%1$b %2$d, %Y @ %I:%M %p', 'Transaction date parsed by strftime', 'lifterlms' ), current_time( 'timestamp' ) ) );

		return apply_filters( 'llms_' . $this->model_post_type . '_get_creation_args', array(
			'comment_status' => 'closed',
			'ping_status'	 => 'closed',
			'post_author' 	 => 0,
			'post_content'   => '',
			'post_excerpt'   => '',
			'post_password'	 => uniqid( 'order_' ),
			'post_status' 	 => 'llms-' . apply_filters( 'llms_default_order_status', 'txn-pending' ),
			'post_title'     => $title,
			'post_type' 	 => $this->get( 'db_post_type' ),
		), $this );
	}

Top ↑

Changelog Changelog

Changelog
Version Description
3.0.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

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





Permalink: