Skip to content

Instantly share code, notes, and snippets.

@goranefbl
Created October 11, 2017 12:20
Show Gist options
  • Save goranefbl/c70ee3abdfac443876a391fb85137f36 to your computer and use it in GitHub Desktop.
Save goranefbl/c70ee3abdfac443876a391fb85137f36 to your computer and use it in GitHub Desktop.
Woocommerce checkout - update shipping outside of table.
add_filter('woocommerce_update_order_review_fragments', 'am2_update_shipping_methods');
function am2_update_shipping_methods($arr) {
ob_start();
echo "<div class='am2-custom-shipping'>";
wc_cart_totals_shipping_html();
echo "</div>";
$woocommerce_shipping_methods = ob_get_clean();
$arr['.am2-custom-shipping'] = $woocommerce_shipping_methods;
return $arr;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment