• Resolved andreahp70076541

    (@andreahp70076541)


    Hello,

    i downloaded the Sequential order number plugin and
    I would like to display the order number managed by the plugin on the woocommerce checkout page (v9.3.3) but, using various commands found online that I have read about using both plugins I cannot display it as with or without $order_id it does not seem to change Nothing. Below are the instructions used

    $order = wc_get_order($order_id);
    $order->get_id();
    $order->get_order_number();

    what am I missing?

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support WebToffee Support

    (@webtoffeesupport)

    Hi @andreahp70076541,

    Thanks for reaching out.

    The plugin assigns sequential order numbers only after an order has been placed. Therefore, it is not possible to display the order number on the checkout page. However, the sequential order number will be shown on the “Thank You” page after the order is completed.

    Thread Starter andreahp70076541

    (@andreahp70076541)

    compared to what was answered to me by the support to those who may need it, I solved it this way

    $items = WC()->checkout->get_checkout_fields(‘billing’);
    $order = 0;
    foreach( $items as $item)
    {
    $order = $item[‘order’];
    if($order > 0)
    {
    break;
    }
    }

    echo “Order ID: ” .$order;

    Plugin Support WebToffee Support

    (@webtoffeesupport)

    Hi @andreahp70076541,

    Thanks for your response.

    It appears there is some confusion. The code you provided displays the WooCommerce Order ID, not the sequential order number generated by the plugin. As mentioned earlier, the plugin assigns sequential order numbers only after an order has been placed. As such, it is not possible to display the Sequential order number on the checkout page. Appreciate your understanding in this matter.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.