Created
February 12, 2021 19:01
-
-
Save michaeltieso/28e9eeebacca517ca84f71e175f3dc82 to your computer and use it in GitHub Desktop.
This file contains 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
# Code to make sure WooCommerce Subscription URL does not update during a Search and Replace script. | |
# Add to your themes functions.php file | |
# Replace https://example.com with your live URL | |
if (class_exists('WC_Subscriptions')) { | |
function wc_subs_live_url() { | |
update_option( 'wc_subscriptions_siteurl', 'https://example.com' ); | |
} | |
add_action('init', 'wc_subs_live_url'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment