WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce - excelling eCommerce
Custom order number not saved to database (1 post)

  1. pricklepantz
    Member
    Posted 11 months ago #

    I am using this gist to customize order number
    https://gist.github.com/mikejolley/2328155

    add_filter( 'woocommerce_order_number', 'custom_woocommerce_order_number', 1, 2 );

    function custom_woocommerce_order_number( $oldnumber, $order ) {
    return 'CUSTOMPREFIX' . $order->id;
    }

    problem is, i make the prefix dynamic by generating 5 digit unique numbers.
    and everytime order page is loaded, these 5 digit keeps changing.
    it turns out that these 5 digits also not added to database eventhough it is sent to email!

    anyone can help?
    Thanks!

    http://wordpress.org/plugins/woocommerce/

Reply

You must log in to post.

About this Plugin

About this Topic