Skip to content

Instantly share code, notes, and snippets.

Avatar

Vikas Khunteta vikaskhunteta

View GitHub Profile
@vikaskhunteta
vikaskhunteta / functions.php
Last active Jul 4, 2018
Get available shipping methods before products added into cart
View functions.php
<?php
// Get available shipping methods before products added into cart
// below function is intended to work with single shipping zone and their methods
// Place this code into functions.php file of your WP active theme
if ( ! function_exists( 'get_available_shipping_methods' ) ) {
function get_available_shipping_methods()
{
global $wpdb;