Created
March 31, 2025 13:28
-
-
Save sebcode/8f45b149aa60a4994c7bfa93544dbe19 to your computer and use it in GitHub Desktop.
woocommerce force setup_future_usage=off_session
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
if (!function_exists('wcs_order_contains_subscription')) { | |
function wcs_order_contains_subscription(mixed $order): bool | |
{ | |
// Pretend that the order contains a subscription, to force `setup_future_usage` to `off_session`. | |
return true; | |
} | |
} | |
if (!function_exists('wcs_is_subscription')) { | |
function wcs_is_subscription(mixed $_order): bool | |
{ | |
return false; | |
} | |
} | |
if (!function_exists('wcs_order_contains_renewal')) { | |
function wcs_order_contains_renewal(mixed $_order): bool | |
{ | |
return false; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment