mirror of
https://gh.wpcy.net/https://github.com/mainwp/Code-Snippets-Functions.git
synced 2026-05-04 12:22:24 +08:00
8 lines
358 B
Text
8 lines
358 B
Text
add_filter('woocommerce_order_item_needs_processing', 'force_processing_for_virtual_downloadables', 10, 3);
|
|
|
|
function force_processing_for_virtual_downloadables($needs_processing, $product, $order) {
|
|
if ($product->is_virtual() && $product->is_downloadable()) {
|
|
return true; // Force it to require processing
|
|
}
|
|
return $needs_processing;
|
|
}
|