Code School: Woo Shipping Per Product Count Script

Here’s a little snippet that has been useful for woocommerce development. This regulates shipping charges from a simple fee based system to a fee per quantity output. We modified this to allow for a couple of different shipping charge options based on quantity – first by three’s and then free shipping if over 9 are purchased.


// if we have items that need shipping, round the quantity / 2 to the nearest whole number

// this produces tiered cost increases for every 2 items

if ( $cart_item_count > 1 ) {

$cost = ceil( $cart_item_count / 3 ) * $cost;

return $cost;


add_filter( ‘woocommerce_shipping_rate_cost’, ‘njengah_wc_shipping_cost_tiers’, 10, 2 );

Digital Worlds

Just finished up a long term project with Digital Worlds at the University of Florida in Gainesville. This web design project intends to reach young

Read More »

Our New Look

Take a peak at our main website’s new look! We’re proud to present a brand new layout and style for Livewire Web Design. We work

Read More »

Google Local

In today’s digital world, it is essential for businesses to have an online presence. Google Maps is one of the most significant tools for local

Read More »