Skip to content

Instantly share code, notes, and snippets.

View codersaiful's full-sized avatar

Saiful Islam codersaiful

View GitHub Profile
<?php
add_filter('wpto_product_description', 'wpto_custom_wpto_product_description');
function wpto_custom_wpto_product_description($description){
$leter_limit = 100;
$description = strip_tags($description);
$description = substr($description,0,$leter_limit);
return $description;
}
<?php
//Add code to your functions.php file or using code snippet plugin from this line
add_filter('wpto_searchbox_taxonomy_name','wpto_custom_searchbox_taxonomy_name', 10, 3);
function wpto_custom_searchbox_taxonomy_name($taxonomy_menu_name, $taxonomy_details, $table_id){
//If want to set based on $table_id
//Here 123 is your selected table id. and uncomment following line
// if($table_id !== 123) return $taxonomy_menu_name;
<?php
function wcmmq_set_min_value_as_input_value($args){
if(is_cart()) return $args;
$args['input_value'] = $args['min_value'] ?? 1;
return $args;
}
add_filter('woocommerce_quantity_input_args','wcmmq_set_min_value_as_input_value',999999);
<?php
/**
* Disable min max for specific condition
*
* @author Saiful Islam <[email protected]>
*/
add_filter('wcmmq_single_product_min_max_condition','wcmmq_custom_min_max_control');
add_filter('wcmmq_add_validation_check','wcmmq_custom_validation_bool');
add_filter('wcmmq_cart_validation_check','wcmmq_custom_validation_bool');
<?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 ){
<?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
<?php
add_filter('wcmmq_ajax_cart_single_page', '__return_true');
/**
* 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