Created
April 13, 2026 07:34
-
-
Save dennisnissle/783ab2befe3d4e4ce98f8e515e111a97 to your computer and use it in GitHub Desktop.
Decide whether an order item is withdrawable or not
This file contains hidden or 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
| <?php | |
| add_filter( 'eu_owb_woocommerce_order_item_is_withdrawable', function( $is_withdrawable, $order_item ) { | |
| $product = $order_item->get_product(); | |
| if ( $product ) { | |
| // Decide based on the original product | |
| } | |
| return $is_withdrawable; | |
| }, 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment