• Resolved skunkbad

    (@skunkbad)


    If I create an order manually in the admin area, when the emails that woocommerce sends go out to admin and the customer, debugging shows that the order number isn’t available yet, so the emails show the order ID.

    The sequential order number is created/applied when I look at the order in the list of orders.

    The sequential order number is created/applied/displayed in orders that are created through the normal checkout process.

    This has only started happening since the last plugin update.

    How can we fix this?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter skunkbad

    (@skunkbad)

    As a temporary solution, I did this:

    class SequentialOrderNumbersMods {
    	
    	/**
    	 * Class constructor
    	 */
    	public function __construct()
    	{
    		add_action( 'woocommerce_process_shop_order_meta',
    			[ $this, 'processShopOrderMeta' ], 9, 2 );
    	}
    	
    	// -----------------------------------------------------------------------
    
    	/**
    	 * Apply the order number as soon as possible
    	 */
    	public function processShopOrderMeta( $postId, $post )
    	{
    		$order = wc_get_order( $postId );
    
    		try{
    			if( $postId == $order->get_order_number() )
    			{
    				$seqNum = \WC_Seq_Order_Number::instance();
    				$seqNum->set_sequential_order_number( $postId, $order );
    			}
    		}
    		catch( \Exception $e ){}
    	}
    	
    	// -----------------------------------------------------------------------
    }

    It’s probably worth noting that you call this action, but only when HPOS is not enabled, currently on line 173. I don’t have HPOS enabled.

    Thread Starter skunkbad

    (@skunkbad)

    Regarding my last message, last paragraph. I meant to say that woocommerce_process_shop_order_meta is only hooked into when HPOS IS enabled, and I don’t have it enabled.

    I’ve identified that same issue too.

    Plugin Support jessicaskyverge

    (@jessicaskyverge)

    Hey @skunkbad and @robinrsa,
    Thank you both for getting in touch with us about Sequential Order Numbers. I’m happy to help and I apologize for the delay in reaching out to you. I appreciate the extra report that this happens when HPOS is enabled @skunkbad. I haven’t replicated this issue, but I have seen reports that our latest release resolved this problem.
    Can you both tell me if you are on the most current version of Sequential Order Numbers, which is v1.10.1? The changelog shows the latest release addressed an issue with Order Numbers and HPOS. If you aren’t on this version could you please give an update a try?

    Thank you,
    Jessica | SkyVerge Plugins

    Plugin Support jessicaskyverge

    (@jessicaskyverge)

    Hey there,

    It has been a long time since we heard from either of you, so I’m going to mark this topic as resolved.

    If you’re still experiencing issues please take a look at our FAQs for more information and create a new thread if you have further questions.

    Thanks,
    Jessica ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Manual Order: order number not available in new order emails’ is closed to new replies.