Settings
1 week ago
BlockHooks.php
1 week ago
BlockHooksFactory.php
1 week ago
Factory.php
1 year ago
Hooks.php
1 week ago
Strings.php
1 week ago
Strings.php
30 lines
| 1 | <?php |
| 2 | |
| 3 | namespace WCML\PaymentGateways; |
| 4 | |
| 5 | use WCML\Utilities\AdminUrl; |
| 6 | |
| 7 | class Strings { |
| 8 | |
| 9 | const TRANSLATION_DOMAIN = 'admin_texts_woocommerce_gateways'; |
| 10 | |
| 11 | const TRANSLATABLE_SETTINGS = [ |
| 12 | 'title', |
| 13 | 'description', |
| 14 | 'instructions', |
| 15 | ]; |
| 16 | |
| 17 | public static function getStringName( $gatewayId, $stringName ) { |
| 18 | return $gatewayId . '_gateway_' . $stringName; |
| 19 | } |
| 20 | |
| 21 | public static function getTranslationInstructions() { |
| 22 | return sprintf( |
| 23 | /* translators: %1$s and %2$s are opening and closing HTML link tags */ |
| 24 | esc_html__( 'To translate custom text for payment methods, go to the %1$sTranslation Dashboard%2$s.', 'woocommerce-multilingual' ), |
| 25 | '<a href="' . esc_url( AdminUrl::getWPMLTMDashboardStringDomain( self::TRANSLATION_DOMAIN ) ) . '">', |
| 26 | '</a>' |
| 27 | ); |
| 28 | } |
| 29 | } |
| 30 |