LLMS_Order::get_creation_args( string $title = '' )
An array of default arguments to pass to $this->create() when creating a new post
Parameters Parameters
- $title
-
(string) (Optional) Title to create the post with.
Default value: ''
Return Return
(array)
Source Source
File: includes/models/model.llms.order.php
protected function get_creation_args( $title = '' ) { $date = llms_current_time( 'mysql' ); if ( empty( $title ) ) { $title = sprintf( // Translators: %1$s = Transaction creation date. __( 'Order – %1$s', 'lifterlms' ), date_format( date_create( $date ), 'M d, Y @ h:i A' ) ); } return apply_filters( "llms_{$this->model_post_type}_get_creation_args", array( 'comment_status' => 'closed', 'ping_status' => 'closed', 'post_author' => 1, 'post_content' => '', 'post_date' => $date, 'post_excerpt' => '', 'post_password' => uniqid( 'order_' ), 'post_status' => 'llms-' . apply_filters( 'llms_default_order_status', 'pending' ), 'post_title' => $title, 'post_type' => $this->get( 'db_post_type' ), ), $this ); }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
5.9.0 | Remove usage of deprecated strftime() . |
5.3.1 | Set the post_date property using llms_current_time() . |
3.10.0 | Unknown. |
3.0.0 | Introduced. |