Dieser Benutzer hat keine favorisierten Themen.
Favorisierte Forenthemen
Erstellte Forenthemen
Status |
Thema
|
Supporter | Stimmen | Beiträge | Aktualität |
---|---|---|---|---|---|
language per domain and woocommerce subscriptions getting staging notice
Gestartet von: creativeT
in: English Support
Problem: functions.php file in your theme folder: // WPML Workaround for compsupp-7065 function wpml_compsupp7065_filter_wc_subscriptions_site_url( $url, $path, $scheme, $blog_id ) { // Define your list of allowed URLs - DO NOT add staging versions here $allowed_url_list = array( 'https://your-live-site.com', 'http://your-other-live-site.com', // Add more URLs as needed ); // Get the current WordPress home URL $current_home_url = home_url(); $current_home_url = parse_url($url, PHP_URL_PATH); $current_home_url = $current_home_url['host']; // Check if the current home URL is in the list foreach ( $allowed_url_list as $listed_url ) { if ( str_contains( $listed_url, $current_home_url) ) { // Replace the $url variable with the listed URL $url = $listed_url; break; } } return $url; } add_filter( 'wc_subscriptions_site_url', 'wpml_compsupp7065_filter_wc_subscriptions_site_url', 10, 4 ); Please ensure to replace the $allowed_url_list array with your site's URLs. If this solution doesn't seem relevant to your issue, please open a new support ticket with us. |
|
2 | 9 | Vor 1 Jahr, 9 Monaten |
Alle Artikel geschrieben von creativeT:
Keine Artikel gefunden