This file contains 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
jQuery.ajax({ | |
type : "post", | |
dataType : "json", | |
url : wpajaxurl.ajaxurl, | |
data : {action: "signupform", form_id : 37 }, | |
success: function(response) { | |
if(response.success) { | |
jQuery('#formcontainer').append(response.form); | |
} | |
else { |
This file contains 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
UPDATE wp_usermeta AS target | |
LEFT JOIN wp_usermeta AS source ON source.user_id = source.user_id AND source.meta_key = 'billing_last_name' | |
SET target.meta_value = source.meta_value | |
WHERE target.user_id = source.user_id AND target.meta_key = 'last_name' |
This file contains 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
//GET CATEGORIES FOR NAVIGATION | |
add_action('tauchbar_get_cats', 'getCatTree', 15); | |
function getCatTree(){ | |
$taxonomy = 'product_cat'; | |
$orderby = 'name'; | |
$show_count = 0; // 1 for yes, 0 for no | |
$pad_counts = 0; // 1 for yes, 0 for no | |
$hierarchical = 1; // 1 for yes, 0 for no | |
$title = ''; | |
$empty = 0; |
This file contains 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
add_filter( 'woocommerce_available_shipping_methods', 'hide_all_shipping_when_free_is_available' , 10, 1 ); | |
function hide_all_shipping_when_free_is_available( $available_methods ) { | |
if( isset( $available_methods['free_shipping'] ) ) : | |
$freeshipping = array(); $freeshipping = $available_methods['free_shipping']; | |
array unset( $available_methods ); | |
$available_methods = array(); | |
$available_methods[] = $freeshipping; | |
endif; |
This file contains 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
add_filter('woocommerce_variable_price_html', 'custom_variation_price', 10, 2); | |
function custom_variation_price( $price, $product ) { | |
$price = ''; | |
if ( !$product->min_variation_price || $product->min_variation_price !== $product->max_variation_price ) $price .= '<span class="from">' . _x('Ab ', 'min_price', 'woocommerce') . ' </span>'; | |
$price .= woocommerce_price($product->min_variation_price); | |
return $price; | |
} |