LLMS_Transaction::get_refund_method_title( string $method )
Retrieves the title of the refund method using during refund processing.
Description Description
This method records the method used to process a refund in the refund order note.
Parameters Parameters
- $method
-
(string) (Required) The refund method ID.
Return Return
(string)
Source Source
File: includes/models/model.llms.transaction.php
protected function get_refund_method_title( $method ) {
switch ( $method ) {
case 'manual':
$method_title = __( 'manual refund', 'lifterlms' );
break;
case 'gateway':
$method_title = $this->get_gateway()->get_admin_title();
break;
default:
/**
* Filters the refund method title for custom refund methods.
*
* The dynamic portion of this hook, `{$method}`, represents the ID of the custom refund method.
*
* @since 3.0.0
* @deprecated 7.0.0 Replaced with `llms_{$method}_refund_title`.
*
* @param string $method The method ID.
*/
$method_title = apply_filters_deprecated( "llms_{$method}_title", array( $method ), '7.0.0', "llms_{$method}_refund_title" );
if ( $method_title !== $method ) {
return $method_title;
}
/**
* Filters the refund method title for custom refund methods.
*
* The dynamic portion of this hook, `{$method}`, represents the ID of the custom refund method.
*
* @since Unknown
*
* @param string $method The method ID.
* @param LLMS_Transaction $transaction The transaction object.
*/
$method_title = apply_filters( "llms_{$method}_refund_title", $method, $this );
}
return $method_title;
}
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
| Version | Description |
|---|---|
| 7.0.0 | Introduced. |