LLMS_Notification_View_Certificate_Earned::set_merge_data( string $code )
Replace merge codes with actual values.
Parameters Parameters
- $code
-
(string) (Required) The merge code to get merged data for.
Return Return
(string) The merged string or the original code for invalid merge codes.
Source Source
File: includes/notifications/views/class.llms.notification.view.certificate.earned.php
protected function set_merge_data( $code ) { if ( in_array( $code, array_keys( $this->set_merge_codes() ), true ) ) { $method = 'set_merge_data_' . strtolower( str_replace( array( '{{', '}}' ), '', $code ) ); $code = method_exists( $this, $method ) ? $this->$method( new LLMS_User_Certificate( $this->notification->post_id ) ) : $code; } return $code; }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
6.0.0 | Refactor to give each merge code it's own method. |
3.8.0 | |
3.16.6 | Introduced. |