Created
August 23, 2023 10:07
-
-
Save PavloBorysenko/cc7dcb25116b2af47208f55a1a462a26 to your computer and use it in GitHub Desktop.
Example about how to show always ‘In Stock products only’ in the search results:
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
add_filter('woof_get_request_data', 'my_woof_get_request_data'); | |
function my_woof_get_request_data($data){ | |
$data['stock']='instock'; | |
return $data; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment