Skip to content

Instantly share code, notes, and snippets.

View wanderer20's full-sized avatar

Oleg wanderer20

  • QL
  • Moscow
View GitHub Profile
@wanderer20
wanderer20 / wc-filter-cart-contents-weight
Created February 17, 2022 09:05 — forked from vanbo/wc-filter-cart-contents-weight
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;
}