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: ''


Top ↑

Return Return

(array)


Top ↑

Source Source

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

735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
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
    );
}


Top ↑

Changelog 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.

Top ↑

User Contributed Notes User Contributed Notes

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