Skip to content

Instantly share code, notes, and snippets.

View taninbkk's full-sized avatar

Tanin taninbkk

View GitHub Profile
@ejntaylor
ejntaylor / functions.php
Created September 17, 2014 15:12
WooCommerce Shipping Calculated after Coupon
<?php
// WooCommerce Shipping Calculated after Coupon
add_filter( 'woocommerce_shipping_free_shipping_is_available', 'filter_shipping', 10, 2 );
function filter_shipping( $is_available, $package ) {
if ( WC()->cart->prices_include_tax )
$total = WC()->cart->cart_contents_total + array_sum( WC()->cart->taxes );
else
@kontikidigital
kontikidigital / functions.php
Last active January 14, 2021 09:42
WooCommerce: Change Select Options Button Text for variable products
add_filter( 'woocommerce_product_add_to_cart_text' , 'custom_woocommerce_product_add_to_cart_text' );
/**
* custom_woocommerce_template_loop_add_to_cart
*/
function custom_woocommerce_product_add_to_cart_text() {
global $product;
$product_type = $product->get_type();
switch ( $product_type ) {