이 사용자는 즐겨찾는 주제가 없습니다.
즐겨찾는 포럼 주제
생성한 포럼 주제
상태 |
주제
|
지원자 | 의견 | 게시물 | 최신 활동 |
---|---|---|---|---|---|
language per domain and woocommerce subscriptions getting staging notice
시작: creativeT
카테고리: 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 | 1 년, 9 월 전에 |
작성한 모든 글 creativeT:
항목을 찾을 수 없습니다.