check and pass product ID into alg_mowc_order_item_valid_as_suborder
-
Hi – I think I’m being a bit dim and struggling to get to grips with the alg_mowc_order_item_valid_as_suborder filter (line 734 of class-all-mowc-core.php)
What can I use in my_function to get the ID of the product ($productID) being checked so that I can return true or false based on if I want that item to be split or not.
Very simplified to show what I’m trying to do:
add_filter('alg_mowc_order_item_valid_as_suborder','myfunction'); myfucntion() { $split_item = false; if ($productID = 1234 ) { $split_item = true; } return $split_item; }
Hope that makes sense
Many thanks
Stef
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘check and pass product ID into alg_mowc_order_item_valid_as_suborder’ is closed to new replies.