Created
June 27, 2025 19:02
-
-
Save Qubadi/a0ed35bcac7d8868ce39e0b8a6feccc6 to your computer and use it in GitHub Desktop.
JetBooking backend, change/translate status
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Copy the following PHP and create a PHP snippet using your snippet plugins. | |
Paste the code into the plugin and save it. | |
______________________________________ | |
add_filter( 'jet-booking/statuses', function( $statuses ) { | |
$translations = [ | |
'completed' => 'Godkjent', | |
'processing' => 'Behandler', | |
'on-hold' => 'På vent', | |
'pending' => 'Avventer', | |
'refunded' => 'Refundert', | |
'cancelled' => 'Kansellert', | |
'failed' => 'Mislykket', | |
'created' => 'Opprettet', | |
]; | |
foreach ( $statuses as $key => $label ) { | |
if ( isset( $translations[ $key ] ) ) { | |
$statuses[ $key ] = $translations[ $key ]; | |
} | |
} | |
return $statuses; | |
}, 10, 1 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment