Skip to content

Commit

Permalink
Merge pull request #79 from codersaiful/2.8.3.5
Browse files Browse the repository at this point in the history
WavePlayer Compatibility features Added
  • Loading branch information
codersaiful authored Feb 8, 2021
2 parents 9f2628d + 5e529d4 commit b28b43b
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 1 deletion.
34 changes: 33 additions & 1 deletion includes/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -1331,4 +1331,36 @@ function wpt_shop_archive_sorting_args( $args ){
* @date 3.2.2021
* @by Saiful
*/
add_filter( 'astra_add_to_cart_quantity_btn_enabled', '__return_false' );
add_filter( 'astra_add_to_cart_quantity_btn_enabled', '__return_false' );



if( !function_exists( 'wpt_ajax_on_first_load' ) ){
/**
* Compability Code for WavePlayer
*
* We actually added this code for
* WavePlayer
*
* Because,
* If u want to enable this code, u have to use following ACTION HOOK to your theme/plugin
* Also can use CodeSnipet Plugin.
*
* Hook is:
* add_action( 'wp_footer', 'wpt_ajax_on_first_load', 100 );
*
* CodeSnippet Plugin URL: https://wordpress.org/plugins/code-snippets/
*/
function wpt_ajax_on_first_load(){

$output = <<<EOT
<script id='by-woo-product-table'>
jQuery(document).ready(function($){
$("button.wpt_search_button").trigger("click");
});
</script>
EOT;
echo $output;
}
}
//add_action( 'wp_footer', 'wpt_ajax_on_first_load', 100 );
2 changes: 2 additions & 0 deletions includes/shortcode.php
Original file line number Diff line number Diff line change
Expand Up @@ -535,6 +535,8 @@ function wpt_shortcode_generator( $atts = false ) {
* @date 9.6.2018 d.m.y
*/
$html .= wpt_search_box( $temp_number, $texonomiy_keywords, $sort_order_by, $sort, $search_n_filter,$table_ID );
}else{
$html .= '<button data-type="query" data-temp_number="' . $temp_number . '" id="wpt_query_search_button_' . $temp_number . '" class="button wpt_search_button query_button wpt_query_search_button wpt_query_search_button_' . $temp_number . '" style="visibility: hidden;height:1px;"></button>';
}
$html .= apply_filters('end_part_advance_search_box_abc','',$table_ID,$temp_number);
/**
Expand Down

0 comments on commit b28b43b

Please sign in to comment.