Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save wanderer20/06a9a15e8e1d2e63b49e26559885b184 to your computer and use it in GitHub Desktop.
Save wanderer20/06a9a15e8e1d2e63b49e26559885b184 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