This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function remove_free_shipping_items( $packages ) { | |
foreach( $packages as $i => $package ){ | |
foreach ( $package['contents'] as $key => $item ) { | |
if ( $item['data']->get_shipping_class() == 'free' ) { | |
unset( $packages[$i]['contents'][$key] ); | |
add_filter( 'woocommerce_cart_needs_shipping', '__return_true' ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function page_map_sc() { | |
ob_start(); ?> | |
<?php if( get_field('my_map') ): ?> | |
<iframe width="600" height="450" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://maps.google.ca/maps?center=<?php the_field('my_map'); ?>&q=<?php the_field('my_map'); ?>&z=14&size=600x450&output=embed&iwloc=near"></iframe> | |
<?php endif; ?> | |
<? $output = ob_get_clean(); | |
return $output; | |
} |