Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?php
add_filter('woocommerce_is_purchasable', 'woocommerce_restaurant_purchasable', 10, 2 );
function woocommerce_restaurant_purchasable($is_purchasable, $product) {
return (!$product->managing_stock() ? false : $is_purchasable);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment