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


Top ↑

Return Return

(string)


Top ↑

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;

	}

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: