Skip to content

Instantly share code, notes, and snippets.

@vanbo
Created October 24, 2017 09:51
Show Gist options
  • Save vanbo/f71ecf4597b79baecd0a71250011149d to your computer and use it in GitHub Desktop.
Save vanbo/f71ecf4597b79baecd0a71250011149d to your computer and use it in GitHub Desktop.
Filter WooCommerce Cart Contents Weight
add_filter( 'woocommerce_cart_contents_weight', 'prefix_filter_cart_contents_weight' );
function prefix_filter_cart_contents_weight( $weight ) {
/**
* Adding 170 units to the total cart weight.
*/
return $weight + 170;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment