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 | |
add_action( 'action_name', 'your_function_name' ); | |
function your_function_name() { | |
// Your code | |
} |
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 codeAstrology_remove_wc_currency_symbols( $currency_symbol, $currency ) { | |
$currency_symbol = ''; | |
return $currency_symbol; | |
} | |
add_filter('woocommerce_currency_symbol', 'codeAstrology_remove_wc_currency_symbols', 10, 2); |
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 codeAstrology_wpto_taxonomy_multiple_off($bool){ | |
return false; | |
} | |
add_filter('wpto_is_multiple_selectable','codeAstrology_wpto_taxonomy_multiple_off'); |
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 ca_ua_remove_placeholder( $WPT_DATA ){ | |
$WPT_DATA['search_select_placeholder'] = "Choose your text"; | |
//To hide placeholder, leave empty value | |
//$WPT_DATA['search_select_placeholder'] = ""; | |
return $WPT_DATA; | |
} |
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 | |
if( !function_exists( 'codeastrology_wpto_searchbox_taxonomy_name' ) ){ | |
function codeastrology_wpto_searchbox_taxonomy_name($taxonomy_name,$taxonomy_details){ | |
if($taxonomy_details->name == 'product_cat'){ | |
return "Filter By Categoty"; | |
} | |
if($taxonomy_details->name == 'product_tag'){ | |
return "Filter By Tag"; | |
} | |
if($taxonomy_details->name == 'pa_size'){ |
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 | |
// Change the checkput prices with $cart_item variable and weight amount | |
function wb_checkout_review ( $quantity, $cart_item, $cart_item_key ) { | |
$cart_item = ' <strong class="product-quantity">' . sprintf( '× %s', $cart_item['quantity'] ) . ' kg </strong>'; // change weight measurement here | |
return $cart_item; | |
} | |
add_filter( 'woocommerce_checkout_cart_item_quantity', 'codeAstrology_checkout_review', 10, 3 ); |
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 | |
// Change the cart prices with $price variable and weight amount | |
function wb_change_product_price_cart( $price ) { | |
$price = $price . ' per kg'; // change weight measurement here | |
return $price; | |
} | |
add_filter( 'woocommerce_cart_item_price', 'codeAstrology_change_product_price_cart' ); |
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 | |
// Change and return $price_html variable using the $price and weight amount | |
function codeAstrology_change_product_html( $price ) { | |
$price_html = '<span class="amount">' . $price . ' per kg </span>'; // change weight measurement here | |
return $price_html; | |
} | |
add_filter( 'woocommerce_get_price_html', 'codeAstrology_change_product_html' ); |
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 | |
if (!function_exists('wpt_show_table_only_shop')) { | |
function wpt_show_table_only_shop($my_archive, $template){ | |
if(!is_shop()){ | |
return $template; | |
} | |
else{ | |
return $my_archive; | |
} | |
} |
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 | |
if( !function_exists( 'codeastrology_wpto_searchbox_taxonomy_name' ) ){ | |
function codeastrology_wpto_searchbox_taxonomy_name($taxonomy_name,$taxonomy_details){ | |
if($taxonomy_details->name == 'product_cat'){ | |
return "Filter By Categoty"; | |
} | |
if($taxonomy_details->name == 'product_tag'){ | |
return "Filter By Tag"; | |
} | |
if($taxonomy_details->name == 'pa_size'){ |