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
Description Description
Parameters Parameters
- $key
-
(string) (Required) property key
Return Return
(string)
Source Source
File: includes/models/model.llms.transaction.php
protected function get_property_type( $key ) { switch ( $key ) { case 'id': case 'order_id': $type = 'absint'; break; case 'refund_data': $type = 'array'; break; case 'amount': case 'gateway_fee_amount': case 'refund_amount': $type = 'float'; break; case 'api_mode': case 'completed_date': case 'currency': case 'gateway_customer_id': case 'gateway_source_id': case 'gateway_source_description': case 'gateway_transaction_id': case 'payment_gateway': case 'payment_type': default: $type = 'text'; } return $type; }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.0.0 | Introduced. |
User Contributed Notes User Contributed Notes
Permalink: