I really don't know any PHP, so thanks for ur time.
When I look for examples (like ot_tax.php) or similar files I went into the developers tool kit and searched: $this->sort_order
Seeing examples like ot_cod_fee.php, ot_group_pricing.php, flat.php, etc.
They are all defining the constant for $this->sort_order.
When I look at the bottom part of the ot_taxjar page, I'm seeing the numeric fields are part of the insert statement.
I'm getting the following warning running 7.3 using the original ot_taxjar.php:
#1 ot_taxjar->__construct() called at [/home/xxxxxxxxx/public_html/stifF-qrU-cHill/modules.php:204]
#2 require(/home/xxxxxxxxx/public_html/stifF-qrU-cHill/modules.php) called at [/home/xxxxxxxxx/public_html/stifF-qrU-cHill/index.php:11]
--> PHP Warning: Use of undefined constant MODULE_ORDER_TOTAL_TAXJAR_SORT_ORDER - assumed 'MODULE_ORDER_TOTAL_TAXJAR_SORT_ORDER' (this will throw an Error in a future version of PHP) in /home/xxxxxxxxx/public_html/includes/modules/order_total/ot_taxjar.php on line 20.
I think the change I attempted above (if it was correct by chance) should have also included an additional line: $this->output = array();
//$this->sort_order = MODULE_ORDER_TOTAL_TAXJAR_SORT_ORDER;
$this->sort_order = defined('MODULE_ORDER_TOTAL_TAXJAR_SORT_ORDER') ? MODULE_ORDER_TOTAL_TAXJAR_SORT_ORDER : null;
if (null === $this->sort_order) return false;
$this->output = array();
Figured the undefined constant was defaulting to true and making sort order values in the db record available?
I'm not saying you're wrong, just trying to understand the mod.