Cet utilisateur n'a aucun sujet favori.
Sujets de forum favoris
Sujets de forum créés
Statut |
Sujet
|
Support | Voix | Messages | Fraîcheur |
---|---|---|---|---|---|
language per domain and woocommerce subscriptions getting staging notice
Commencé par : creativeT
dans : 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 | Il y a 1 année et 9 mois |
Tous les articles écrits par creativeT:
Aucun élément trouvé