Skip to content

Instantly share code, notes, and snippets.

View codersaiful's full-sized avatar

Saiful Islam codersaiful

View GitHub Profile
<?php
function ca_notice_timeout_change($WPT_DATA){
$WPT_DATA['notice_timeout'] = 10000; //mili seconds
return $WPT_DATA;
}
add_filter('wpto_localize_data','ca_notice_timeout_change');
# END WordPress
php_value max_input_vars 4000
<?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;
}
/****************************
* 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 {
<?php
/**
* Plugin Name: Create Table in WP Database
* Plugin URI: https://wooproducttable.com/pricing/?utm_source=WPT+Plugin+Dashboard&utm_medium=Free+Version
* Description: (WooproductTable) WooCommerce product table plugin helps you to display your products in a searchable table layout with filters. Boost conversions & sales. Woo Product Table is best for Wholesale.
* Author: CodeAstrology Team
* Author URI: https://wooproducttable.com/?utm_source=WPT+Plugin+Dashboard&utm_medium=Free+Version
* Tags: woocommerce product list,woocommerce product table, wc product table, product grid view, inventory, shop product table
*
* Version: 3.2.4
<?php
add_filter('wpt_query_args','wpt_custom_args_mangaement');
function wpt_custom_args_mangaement( $args ){
$args['posts_per_page'] = 3;
return $args;
}
<?php
remove_action('woocommerce_shop_loop','electro_shop_loop');
add_action('woocommerce_shop_loop','ca_wpt_custom_shoppage_table_temp');
function ca_wpt_custom_shoppage_table_temp(){
$config = get_option( 'wpt_configure_options' );
$table_id = isset( $config['archive_table_id'] ) ? $config['archive_table_id'] : false;
$table_id = apply_filters( 'wpto_default_archive_table_id', $table_id );
$table_id = is_numeric( $table_id ) ? (int) $table_id : false;
$id = get_queried_object_id();
<?php
add_filter('woocommerce_product_loop_start','__return_false');
add_filter('woocommerce_product_loop_end','__return_false');
add_filter('wc_get_template_part',function($template, $slug, $name){
// var_dump($template, $slug, $name);
if($slug === 'content' && $name === 'product') return false;
return $template;
}, 10, 3);
remove_action('woocommerce_before_shop_loop','wc_setup_loop');
<?php
//COPY THIS BELLOW LINE ONLY TO PASTE IN YOUR functions.php
add_filter('wcmmq_default_qty_option', '__return_true');
add_filter('wcmmq_single_product_min_max_condition', 'wcmmq_custom_default_value_enable', 10, 2);
function wcmmq_custom_default_value_enable($args, $product){
if(!defined('WC_MMQ_PREFIX')) return $args;
$product_id = $product->get_id();
$key = WC_MMQ_PREFIX . 'default_quantity';
<?php
add_filter('wqpmb_show_validation',function($bool, $data){
global $product;
if(!is_object($product)) return $bool;
if(is_object($product) && $product->get_type() === 'simple'){
return $bool;
}else{
return false;
}