Skip to content

Instantly share code, notes, and snippets.

@Qubadi
Created June 27, 2025 19:02
Show Gist options
  • Save Qubadi/a0ed35bcac7d8868ce39e0b8a6feccc6 to your computer and use it in GitHub Desktop.
Save Qubadi/a0ed35bcac7d8868ce39e0b8a6feccc6 to your computer and use it in GitHub Desktop.
JetBooking backend, change/translate status
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