Created
May 25, 2018 14:30
-
-
Save bolderelements/c6fb492e15ce4a49bae9fe60c2a5d4ae to your computer and use it in GitHub Desktop.
Modify the Order Weight for Table Rate Shipping Settings
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Adds additional weight to cover packaging costs. | |
* | |
* Requires Table Rate Shipping 4.2+ | |
*/ | |
function betrs_add_packaging_weight( $calculated_totals, $items ){ | |
// weight to add | |
$add_weight = 350; // change this value to weight needed | |
// add weight to calculated totals | |
$calculated_totals['weight'] += $add_weight; | |
return $calculated_totals; | |
} | |
add_filter( 'betrs_calculated_totals-per_order', 'betrs_add_packaging_weight', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment