// Change string __( 'cart', 'woocommerce' ) add_filter( 'gettext', 'snippetpress_change_text', 10, 3 ); function snippetpress_change_text( $translation, $text, $domain ) { if ( $domain == 'woocommerce' ) { // Replace woocommerce with the text domain of your plugin if ( $text == 'cart' ) { // Replace cart with the word you want to change $translation = 'basket'; // Replace basket with your new word } } } //Change string with context _x( 'On hold', 'Order status', 'woocommerce' ) add_filter( 'gettext_with_context', 'snippetpress_change_text_with_context', 10, 4 ); function snippetpress_change_text_with_context ( $translation, $text, $context, $domain ) { if ( $domain == 'woocommerce' ) { if ( $text == 'On hold' && $context =='Order status' ) { $translation = 'Order received'; } } return $translation; }