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 my_custom_footer_script() { | |
?> | |
<script type="text/javascript"> | |
jQuery(document).ready(function($) { | |
var inputBox = $('input.input-text.qty.text.wcmmq-qty-input-box.input-text.qty'); | |
inputBox.attr('type','number'); | |
inputBox.attr('inputmode','numeric'); | |
$(document.body).on('change','input.input-text.qty.text.wcmmq-qty-input-box.input-text.qty',function(){ | |
var thisInputBox = $(this); |
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_is_multiple_selectable','__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 | |
add_filter( 'wpt_archive_layout', 'wpt_custom_archive_layout' ); | |
/** | |
* Determines the layout for the archive page. Specially for Shop page actually | |
* First enable from Configuration page. | |
* See @link https://wooproducttable.com/docs/doc/table-options/product-table-woocommerce-archive-category-tag-attribute-page/ | |
* | |
* @param string $layout The current view. Available table|grid | |
* @return string The layout for the archive page. Possible values are 'table' or 'grid'. |
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 | |
/** | |
* To enable Custom Validaion message from | |
* Configure / Setting, Use following filter | |
*/ | |
add_filter('wcmmq_custom_validation_msg', '__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 | |
add_filter('gettext', 'wpt_custom_specific_text_change', 10, 3); | |
function wpt_custom_specific_text_change($translation, $text, $domain) { | |
if ($domain !== 'woo-product-table') return $translation; | |
// Check if the original translation text matches "Your Text" | |
if ($translation === 'Your Text') { | |
return 'Your Custom Text'; // Replace with your custom text | |
} |
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 | |
/** | |
* Replace your item and items text | |
* for Footer Cart | |
*/ | |
add_filter('ngettext_woo-product-table', 'wpt_custom_item_text_change', 10, 5); | |
function wpt_custom_item_text_change($translation, $single, $plural, $number, $domain) { | |
if ($single !== '%d item') return $translation; |
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 | |
/** | |
* Disable Plus minus button for specific page | |
* such: cart page, checkout page, | |
* using filter hook: 'wqpmb_show_validation' | |
* | |
* There are few filter hook | |
* wqpmb_show_validation bool filter hook | |
* wqpmb_on_product_page bool filter hook |
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 | |
//Use following code. You can use it using code snippet plugin or in your theme’s functions.php file. | |
add_action('wpt_table_row',function($Row){ | |
$price = $Row->product_data['price'] ?? 'no_price'; | |
if( empty( $price )){ | |
$Row->display = 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 | |
/** | |
* If you want to set Zero for default quantity value, | |
* this function and hook will help you. | |
* | |
* @author Saiful Islam <[email protected]> | |
*/ | |
add_filter('woocommerce_quantity_input_min','wpt_custom_default_quantity_zero'); | |
function wpt_custom_default_quantity_zero(){ |
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 | |
/** | |
* Default Quantity Handle for old user | |
* Actually I have removed default quanity feature for new version. | |
* | |
* @author Saiful Islam <[email protected]> | |
* @link https://github.com/codersaiful | |
*/ |
NewerOlder