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 wpto_shortmessage_string_callback( $msg_label ){ | |
$msg_label = __( 'Extra Note', 'wpt_pro' ); | |
return $msg_label; | |
} | |
add_filter( 'wpto_shortmessage_string' , 'wpto_shortmessage_string_callback' ); |
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
/**************************** | |
* CUSTOM CODE FOR WOO PRODUCT TABLE | |
* Here we have used important, because Our theme has override and Woo Product Table plugins Style. | |
****************************/ | |
.wpt_product_table_wrapper p.woocommerce-mini-cart__buttons.buttons { | |
display: inline-flex; | |
float: right; | |
} | |
.wpt_product_table_wrapper p.woocommerce-mini-cart__buttons.buttons a.button { |
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_filter('wpto_viewed_product_message', function(){ | |
return __( "Visited", 'wpt_pro' ); | |
}); |
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_filter( 'wpto_add_to_cart_view' , function(){ | |
return false; | |
}); |
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 | |
remove_action( 'woocommerce_single_product_summary', 'wpt_show_variation_table', 3 ); | |
add_action( 'woocommerce_single_product_summary', 'wpt_change_variation_table_location', 3 ); | |
function wpt_change_variation_table_location(){ | |
global $product; | |
//var_dump($product->get_type()); | |
if( $product->get_type() !== 'variable' ) return; | |
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('wpto_action_table_wrapper_top','check_cart_weight'); | |
function check_cart_weight(){ | |
global $woocommerce; | |
$weight = $woocommerce->cart->cart_contents_weight; | |
if( $weight > 20 ){ | |
echo sprintf( __( '<div class="woocommerce"><ul class="woocommerce-error" role="alert"> | |
<li> | |
You have reached your weight allowed limit per order currently at %sKg, we allow only 20kg of weight per order . If you require more items please check out this order and start a new order. </li> |
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 | |
/** | |
* Checking if is_sold_individually | |
* then wc will not show qty box | |
* that's why, I return default template | |
* | |
* rest will handle from WooCommerce | |
* | |
* @since 1.0.8 | |
*/ |
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_localize_data_callback($WPT_DATA){ | |
$WPT_DATA['select2'] = 'disable'; | |
return $WPT_DATA; | |
} | |
add_filter('wpto_localize_data','codeAstrology_wpto_localize_data_callback'); |
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'); |