LLMS_Transaction::get_property_type( string $key )
Get a property’s data type for scrubbing used by $this->scrub() to determine how to scrub the property
Parameters Parameters
- $key
-
(string) (Required) property key
Return Return
(string)
Source Source
File: includes/models/model.llms.transaction.php
*
* @param int $order_id LLMS_Order ID of the related order.
* @return array
*/
protected function get_creation_args( $order_id = 0 ) {
$date = llms_current_time( 'mysql' );
$title = sprintf(
// Translators: %1$d = Order ID; %2$s = Transaction creation date.
__( 'Transaction for Order #%1$d – %2$s', 'lifterlms' ),
$order_id,
date_format( date_create( $date ), 'M d, Y @ h:i A' )
);
// This filter is documented in includes/abstracts/abstract.llms.post.model.php.
return apply_filters(
"llms_{$this->model_post_type}_get_creation_args",
array(
'comment_status' => 'closed',
'ping_status' => 'closed',
'post_author' => 0,
'post_content' => '',
'post_date' => $date,
'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
);
}
/**
* Get the total amount of the transaction after deducting refunds
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
| Version | Description |
|---|---|
| 3.0.0 | Introduced. |