LLMS_Transaction::translate( string $key )
Wrapper for $this-get() which allows translation of the database value before outputting on screen
Description Description
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. |
User Contributed Notes User Contributed Notes
Permalink: