Created
November 12, 2019 12:29
-
-
Save yousufansa/30864ce960ef97c8b1fae7da3305c31e to your computer and use it in GitHub Desktop.
Electro - Exclude Out of Stock Products From Live Search
This file contains 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
if ( !function_exists( 'electro_child_wc_live_search_query_custom_args' ) ) { | |
function electro_child_wc_live_search_query_custom_args( $args ) { | |
$args['stock_status'] = array( 'instock', 'onbackorder' ); | |
return $args; | |
} | |
} | |
add_filter( 'electro_wc_live_search_query_args', 'electro_child_wc_live_search_query_custom_args' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment