Title: Sequential orders pro
Last modified: November 4, 2021

---

# Sequential orders pro

 *  [pldoolittle](https://wordpress.org/support/users/pldoolittle/)
 * (@pldoolittle)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/sequential-orders-pro/)
 * I am using a plugin called Sequential Orders that does three things.
 * Started new orders at a given number. (1001xxxx)
    Prefixed orders with a string(
   W-) Keeps all actual orders sequential.
 * #1 was important because with we implemented woo in place of a 20 year old store
   and single digit order numbers have duplicates in our database. in the admin 
   console, everything is working exactly as expected.
 * In Shipworks, however, all the orders are still the underlying Woo orders (post
   Id?) and colliding with very old orders.
 * Is there anyway to get SWC to use the order number field instead of the record
   number?
    -  This topic was modified 4 years, 6 months ago by [pldoolittle](https://wordpress.org/support/users/pldoolittle/).

Viewing 11 replies - 1 through 11 (of 11 total)

 *  Thread Starter [pldoolittle](https://wordpress.org/support/users/pldoolittle/)
 * (@pldoolittle)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/sequential-orders-pro/#post-15038390)
 * For reference, this plugin stores the order id in the table ns_postmeta with 
   a meta_key set to a value of ‘_order_number’ and meta_value set to the order 
   ID.
 * When this plug in is installed, everything inside woocommerce refers to the order
   by the meta value.
 * From the code, this may help:
 *     ```
       // Show sequential order number
       add_filter('woocommerce_order_number', array($this, 'display_sequence_number'), 10, 2);
       ```
   
 *     ```
       public function display_sequence_number($order_number, $order) {
               $order_id = (WC()->version < '2.7.0') ? $order->id : $order->get_id();
               $sequential_order_number = get_post_meta($order_id, '_order_number', TRUE);
               $sequential_order_number = apply_filters('wt_alter_sequence_number',$sequential_order_number,$order_id);
               return ($sequential_order_number) ? $sequential_order_number : $order_number;
           }
       ```
   
 * If I understand this correctly, woocommerce_order_number is being overridden.
   Which suggests that the ShipWorks Connector for Woocommerce is getting it’s data
   directly from the DB? or via another WC function that is not being overridden.
 * Is there a fix/workaround?
    -  This reply was modified 4 years, 6 months ago by [pldoolittle](https://wordpress.org/support/users/pldoolittle/).
    -  This reply was modified 4 years, 6 months ago by [pldoolittle](https://wordpress.org/support/users/pldoolittle/).
    -  This reply was modified 4 years, 6 months ago by [pldoolittle](https://wordpress.org/support/users/pldoolittle/).
    -  This reply was modified 4 years, 6 months ago by [pldoolittle](https://wordpress.org/support/users/pldoolittle/).
 *  Thread Starter [pldoolittle](https://wordpress.org/support/users/pldoolittle/)
 * (@pldoolittle)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/sequential-orders-pro/#post-15038453)
 * Armed with that info, I dug into your plug in and found this:
 * shipworks-e-commerce-bridge\model\Order.class.php
 *     ```
       if ( ( is_plugin_active_custom( "woocommerce-sequential-order-numbers/woocommerce-sequential-order-numbers.php")
       				||  is_plugin_active_custom( "woocommerce-sequential-order-numbers-pro/woocommerce-sequential-order-numbers.php")
       					||  is_plugin_active_custom( "woocommerce-sequential-order-numbers-pro/woocommerce-sequential-order-numbers-pro.php") ) ) {
       ...
       				if(getInformation( $this->row, '_order_number' ) != NULL) {
       					$this->id_order = getInformation( $this->row, '_order_number' );
       ```
   
 * BUT…. The module I have(webToffee – Sequential Order Numbers for WooCommerce),
   does not live in:
 * woocommerce-sequential-order-numbers/woocommerce-sequential-order-numbers.php
 * It lives at wt-woocommerce-sequential-order-numbers/wt-advanced-order-number.
   php
 * So I made the following modification and it works! Well, it appears to, hopefully
   nothing else was broken with this hack.
 *     ```
       	if ( ( is_plugin_active_custom( "woocommerce-sequential-order-numbers/woocommerce-sequential-order-numbers.php")
       				||  is_plugin_active_custom( "woocommerce-sequential-order-numbers-pro/woocommerce-sequential-order-numbers.php")
       					||  is_plugin_active_custom( "wt-woocommerce-sequential-order-numbers/wt-advanced-order-number.php")
       						||  is_plugin_active_custom("woocommerce-sequential-order-numbers-pro/woocommerce-sequential-order-numbers-pro.php") ) ) {
       ```
   
    -  This reply was modified 4 years, 6 months ago by [pldoolittle](https://wordpress.org/support/users/pldoolittle/).
 *  Thread Starter [pldoolittle](https://wordpress.org/support/users/pldoolittle/)
 * (@pldoolittle)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/sequential-orders-pro/#post-15038471)
 * Well, we have a small snag. The order failed to upload with the error:
 * An Error occurred uploading shipment information for order -9223372036854775808
   
   Note: that is NOT the tracking number.
 * So I dropped the W prefix from the order number and got this error:
 * An Error occurred uploading shipment information for order 1011132
    Note: that
   is the correct sequential order number.
    -  This reply was modified 4 years, 6 months ago by [pldoolittle](https://wordpress.org/support/users/pldoolittle/).
 *  Thread Starter [pldoolittle](https://wordpress.org/support/users/pldoolittle/)
 * (@pldoolittle)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/sequential-orders-pro/#post-15038485)
 * This was the request:
 *     ```
       <Post>
       <Url>https://domainname.com/store/wp-admin/admin.php?page=shipworks-wordpress</Url><Parameter><Name>order</Name><Value>1011132</Value></Parameter>
       <Parameter><Name>tracking</Name><Value>XXXXXXXXXXXXXXX</Value></Parameter>
       <Parameter><Name>carrier</Name><Value>USPS</Value></Parameter>
       <Parameter><Name>shippingcost</Name><Value>3.3100</Value></Parameter>
       <Parameter><Name>shippingdate</Name><Value>2021-11-04T04:00:00</Value></Parameter>
       <Parameter><Name>action</Name><Value>updateshipment</Value></Parameter>
       <Parameter><Name>username</Name><Value>XXXXXXXXXXX</Value></Parameter>
       <Parameter><Name>password</Name><Value>XXXXXXXXXXXXXXX</Value></Parameter>
       </Post>
       ```
   
 * And the response:
 *     ```
       <?xml version="1.0" standalone="yes" ?><ShipWorks moduleVersion="3.1.22.3273" schemaVersion="1.0.0">
         <Error>
           <Code>ERR004</Code>
           <Description>The order is not in the Database</Description>
         </Error>
       </ShipWorks>
       ```
   
    -  This reply was modified 4 years, 6 months ago by [pldoolittle](https://wordpress.org/support/users/pldoolittle/).
    -  This reply was modified 4 years, 6 months ago by [pldoolittle](https://wordpress.org/support/users/pldoolittle/).
    -  This reply was modified 4 years, 6 months ago by [pldoolittle](https://wordpress.org/support/users/pldoolittle/).
 *  Thread Starter [pldoolittle](https://wordpress.org/support/users/pldoolittle/)
 * (@pldoolittle)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/sequential-orders-pro/#post-15040208)
 * Looking into Shipworks further, simply placing the _order_number into a custom
   field would solve the update problem and allow searching by the alternate order
   number.
 * It’s not ideal, as it would require that all templates using order number be 
   modified to detect the presence of an alternate order number, but it would make
   the values available and place further coding in the hands of the users (i.e.
   me).
 *  Thread Starter [pldoolittle](https://wordpress.org/support/users/pldoolittle/)
 * (@pldoolittle)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/sequential-orders-pro/#post-15041578)
 * Ok, with the help of the plugin vendor, I have it mostly working. The following
   line
 * `|| is_plugin_active_custom( "wt-woocommerce-sequential-order-numbers/wt-advanced-
   order-number.php"))`
 * Needs to be inserted after:
 * `if ( is_plugin_active_custom( "woocommerce-sequential-order-numbers/woocommerce-
   sequential-order-numbers.php")`
 * In these files:
    /shipworks-e-commerce-bridge/model/Order.class.php /shipworks-
   e-commerce-bridge/model/StatusManager.class.php /shipworks-e-commerce-bridge/
   model/TrackingManager.class.php
 * At this point, it works EXCEPT:
    – If you use an alpha prefix (appears to be 
   a typing issue) – Changing an order from “On Hold” to “Processing” is not picked
   up in Shipworks.
 * BUT…
    Updating orders to Completed in Shipworks now fires the Woo Completed action.
    -  This reply was modified 4 years, 6 months ago by [pldoolittle](https://wordpress.org/support/users/pldoolittle/).
 *  Plugin Author [AdvancedCreation](https://wordpress.org/support/users/advancedcreation/)
 * (@advancedcreation)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/sequential-orders-pro/#post-15152947)
 * Hello,
 * Sorry I just saw your message, I believe you are not using the plugin compatible
   with our plugin, sequential order number plugin should be the one made by Skyverge.
   
   Please contact us directly via the contact form or via the chat online on our
   website, I will reply right away. Thank you Olivier
 *  Thread Starter [pldoolittle](https://wordpress.org/support/users/pldoolittle/)
 * (@pldoolittle)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/sequential-orders-pro/#post-15153028)
 * Olivier,
 * I am absolutely using your plugin. And I am using the only authorized shipworks
   plugin.
 * I detailed the problem and did the troubleshooting for you. Please fix.
 *  Thread Starter [pldoolittle](https://wordpress.org/support/users/pldoolittle/)
 * (@pldoolittle)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/sequential-orders-pro/#post-15388557)
 * The latest update broke my store functionality again. It is a simple fix to your
   code, please include it in future releases.
 * In these files:
    - Order.class.php
    - StatusManager.class.php
    - TrackingManager.class.php
 * Find this:
 *     ```
       if ( ( is_plugin_active_custom( "woocommerce-sequential-order-numbers/woocommerce-sequential-order-numbers.php")
       	||  is_plugin_active_custom( "woocommerce-sequential-order-numbers-pro/woocommerce-sequential-order-numbers.php")
       	||  is_plugin_active_custom( "woocommerce-sequential-order-numbers-pro/woocommerce-sequential-order-numbers-pro.php") ) ) {
       ```
   
 * And replace it with this:
 *     ```
       if ( is_plugin_active_custom( "woocommerce-sequential-order-numbers/woocommerce-sequential-order-numbers.php")
       	||  is_plugin_active_custom( "woocommerce-sequential-order-numbers-pro/woocommerce-sequential-order-numbers.php")
       	||  is_plugin_active_custom( "woocommerce-sequential-order-numbers-pro/woocommerce-sequential-order-numbers-pro.php")
       	||  is_plugin_active_custom( "wt-woocommerce-sequential-order-numbers/wt-advanced-order-number.php")) {
       ```
   
    -  This reply was modified 4 years, 3 months ago by [pldoolittle](https://wordpress.org/support/users/pldoolittle/).
 *  Plugin Author [AdvancedCreation](https://wordpress.org/support/users/advancedcreation/)
 * (@advancedcreation)
 * [4 years ago](https://wordpress.org/support/topic/sequential-orders-pro/#post-15616702)
 * sorry but webtoffee sequential order number is not yet compatible, only this 
   plugin is compatible with the pro version
    [https://wordpress.org/plugins/woocommerce-sequential-order-numbers/](https://wordpress.org/plugins/woocommerce-sequential-order-numbers/)
 * If you already did the work, please contact me via our form on our website [https://adv.design](https://adv.design),
   and I will add it to the next update
 * Let me know
    Olivier
 *  Thread Starter [pldoolittle](https://wordpress.org/support/users/pldoolittle/)
 * (@pldoolittle)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/sequential-orders-pro/#post-15830057)
 * Olivier,
 * yes, I already made the changes. They are listed in the post you just replied
   to.

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘Sequential orders pro’ is closed to new replies.

 * ![](https://ps.w.org/shipworks-e-commerce-bridge/assets/icon-256x256.jpg?rev=
   2357749)
 * [ShipWorks Connector for Woocommerce](https://wordpress.org/plugins/shipworks-e-commerce-bridge/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/shipworks-e-commerce-bridge/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/shipworks-e-commerce-bridge/)
 * [Active Topics](https://wordpress.org/support/plugin/shipworks-e-commerce-bridge/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/shipworks-e-commerce-bridge/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/shipworks-e-commerce-bridge/reviews/)

## Tags

 * [order number](https://wordpress.org/support/topic-tag/order-number/)
 * [shipworks](https://wordpress.org/support/topic-tag/shipworks/)

 * 11 replies
 * 2 participants
 * Last reply from: [pldoolittle](https://wordpress.org/support/users/pldoolittle/)
 * Last activity: [3 years, 10 months ago](https://wordpress.org/support/topic/sequential-orders-pro/#post-15830057)
 * Status: not resolved