Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- *if there is no presence of postcode for estimate , make shipping cost 0
- * @param object $options shipping detail
- * @author vinay
- *
- */
- if ( !function_exists("show_initial_shipping_cost") ):
- function show_initial_shipping_cost($options) {
- global $Shopp;
- if ( $Shopp->Shopping->data->Order->Shipping->postcode != "" ){
- //do nothing for now
- } else {
- $options["Domestic Shipping"]->amount = 0;
- }
- #if ( $_SERVER['REMOTE_ADDR'] == "110.44.113.254" )
- //$Shopp->Shipping->postcodes
- #print_r($Shopp->Shipping);
- }
- endif;
- //hook to calculate total shipping
- add_action('shopp_calculate_shipping','show_initial_shipping_cost',100);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement