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 | |
//Athis this code inside your theme's functions.php file. | |
add_action('wp_footer',function(){ | |
?> | |
<script> | |
jQuery(function($){ | |
'use strict'; | |
$(document).ready(function($){ | |
$('button.button.wpt-search-products').attr('id','saiful'); | |
}); |
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('wpt_table_row_attr', function($attr, $row_object){ | |
$product_id = $row_object->product_id; | |
// var_dump($attr, $row_object); | |
$color_code = '#aabbcc'; | |
return "style=background-color:$color_code;"; | |
return $attr; | |
},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 | |
add_filter('wpt_table_row_attr', function($attr, $row_object){ | |
$product_id = $row_object->product_id; | |
$color = get_post_meta($product_id, '_wpt_bg_color', true); | |
// if( empty( $color ) ) return; | |
// $color = '#aabbcc'; | |
// return "data-color='$color_code'"; | |
return "style='background-color:$color;'"; | |
},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 | |
add_filter( 'woocommerce_loop_add_to_cart_args', 'wcmmq_custom_min_max_arg_regen', 999999, 2 ); | |
add_filter( 'woocommerce_quantity_input_args', 'wcmmq_custom_min_max_arg_regen', 999999, 2 ); | |
add_filter( 'woocommerce_available_variation', 'wcmmq_custom_min_max_arg_regen', 999999, 2 ); | |
function wcmmq_custom_min_max_arg_regen($args, $product) | |
{ | |
$product_id = $product->get_id(); | |
$stock_status = get_post_meta($product_id,'_stock_status',true); |
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('wpt_query_args',function($args){ | |
//Change your text here | |
$target_Text = 'Your Text'; | |
$args['s'] = $args['wpt-s'] = $target_Text; | |
$args['wpt_query_type'] = 'search'; | |
return $args; | |
}); |
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 you want, that your table will display with default search | |
* suppose: you want to show product based on search keyword, | |
* use following code snippet | |
* | |
* you can add your code to your | |
* theme's functions.php file | |
* |
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
/** | |
* Add following Code at your functions.php file of your child theme | |
* OR | |
* Add following code using code snippet | |
* OR | |
* Add code in your custom plugin. | |
* | |
* This is specially for Woo Product Table Mini Filter | |
* Search option. Actually here |
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('wcmmq_ajax_cart_single_page', '__return_true'); |
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_variation_table' ) ){ | |
/** | |
* Show variation table on each and every variable product page | |
* which will replaced the default variation dropdown select options. | |
* | |
* | |
* @since 7.0.8.1 |
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_variation_table_args' ) ){ | |
/** | |
* Args manipulation for variable product | |
* | |
* @param array $args WPT default args array | |
* @return array | |
*/ | |
function wpt_variation_table_args( $args ){ |