• I’m using this snippet to customize order id’s,

    add_filter( 'woocommerce_order_number', 'site_order_number', 1, 2 );
    function site_order_number( $oldnumber, $order, $order_date ) {
    	return 'SITE-' . $order->id . '-' . date( 'dmY', strtotime( $order->order_date ) );
    }

    I can see the changes in the WooCommerce > Orders page. But the Orders page takes a bit longer than usual to load. So I checked the apache error logs, it says:

    Missing argument 3 for site_order_number() in ....

    I read that woocommerce_order_number hook takes 3 arguments,one is
    $instace, other two are $integers.

    So what am I doing wrong?

    Any help is much appreciated !

    https://www.ads-software.com/plugins/woocommerce/

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Customizing Order Id's’ is closed to new replies.