LLMS_Transaction::translate( string $key )
Translation wrapper for {@see LLMS_Transaction::get()` which enables l10n of database values.
Parameters Parameters
- $key
-
(string) (Required) Key to retrieve.
Return Return
(string)
Source Source
File: includes/models/model.llms.transaction.php
public function translate( $key ) { $val = $this->get( $key ); switch ( $key ) { case 'payment_type': if ( 'single' === $val ) { $val = __( 'Single', 'lifterlms' ); } elseif ( 'recurring' === $val ) { $val = __( 'Recurring', 'lifterlms' ); } elseif ( 'trial' === $val ) { $val = __( 'Trial', 'lifterlms' ); } break; default: $val = $val; } return $val; }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.0.0 | Introduced. |