Ecommerce Shopify WordPress Discussion

How to make the number of the order sequential and with a different prefix for every language, using Polylang

Good morning everyone and happy new year. I need some advice on how to proceed with the following implementation. For my site in multiple languages that uses Polylang as a plugin, I would need to have separate and consecutive numbering for the orders. For example: Italian: IT-2024-01, IT-2024-02, IT-2024-03 German: DE-2024-01, DE-2024-02, DE-2024-03. Thank you for your interesting insights. Right now I just used this snippet for the italian: /** Orders Prefix */ add_filter( 'woocommerce_order_number', 'change_woocommerce_order_number' ); function change_woocommerce_order_number( $order_id ) { $order = wc_get_order( $order_id ); if ( $order && $order->get_date_created() ) { $order_year = $order->get_date_created()->format( 'Y' ); $prefix = 'IT-' . $order_year . '-'; $new_order_id = $prefix . $order_id; return $new_order_id; } return $order_id; } Thanks, from my heart!
TurboCommerce make the better internet purchasing globaly

Turbo Multi-language Translator

Make the better internet purchasing globaly

Turbosify SEO Speed Booster

5.0 (7) Free plan available
Get better conversions by improving store loading speed Installed

Turbo Multi-language Chat - AI Customer service in one hand

TurboCommerce make the better internet purchasing globaly
Our products

The help you need, when you need it

App by Turbo Engine

3 apps • 5.0 average rating

Turbosify Speed Booster

5.0 (7)
Get better conversions by optimizing shopify store Google page speed Installed

Turbosify Translator for Wordpress Woocommerce

5.0 (74) Free Wordpress Woocommerce Plugin
Translate your wordpress website to multiple language within 1 click, no configuration needed, no No technical required

Grow your business here

Whether you want to sell products down the street or around the world, we have all the tools you need.