| @@ -162,12 +162,12 @@ | ||
| 162 | 162 | $account_after_checkout = in_array( get_option( 'woocommerce_enable_delayed_account_creation' ), [ 1, '1', 'yes', 'on' ], true ); |
| 163 | 163 | |
| 164 | 164 | $issues = []; |
| 165 | 165 | if ( ! $guest_checkout_enabled ) { |
| 166 | - $issues[] = 'Guest checkout.'; | |
| 166 | + $issues[] = __( 'Guest checkout.', 'subscription' ); | |
| 167 | 167 | } |
| 168 | 168 | if ( ! $account_during_checkout ) { |
| 169 | - $issues[] = 'Account creation during checkout.'; | |
| 169 | + $issues[] = __( 'Account creation during checkout.', 'subscription' ); | |
| 170 | 170 | } |
| 171 | 171 | |
| 172 | 172 | if ( ! empty( $issues ) ) { |
| 173 | 173 | $settings_url = admin_url( 'admin.php?page=wc-settings&tab=account' ); |
| @@ -177,10 +177,13 @@ | ||
| 177 | 177 | $list_html .= '<li><span class="dashicons dashicons-arrow-right"></span> <strong>' . $issue . '</strong></li>'; |
| 178 | 178 | } |
| 179 | 179 | |
| 180 | 180 | $requirement_html = '<div class="notice notice-error is-dismissible">' . |
| 181 | - '<p>To ensure Subscriptions guest checkout functions correctly, please enable the following settings in WooCommerce. ' . | |
| 182 | - 'Click <a href="' . $settings_url . '">here</a> to go to the settings.</p>' . | |
| 181 | + '<p>' . sprintf( | |
| 182 | + /* translators: %s: URL of the WooCommerce account settings. */ | |
| 183 | + __( 'To ensure Subscriptions guest checkout functions correctly, please enable the following settings in WooCommerce. Click <a href="%s">here</a> to go to the settings.', 'subscription' ), | |
| 184 | + esc_url( $settings_url ) | |
| 185 | + ) . '</p>' . | |
| 183 | 186 | '<ul>' . $list_html . '</ul></div>'; |
| 184 | 187 | |
| 185 | 188 | echo wp_kses_post( $requirement_html ); |
| 186 | 189 | } |
| @@ -188,10 +191,14 @@ | ||
| 188 | 191 | if ( $account_after_checkout ) { |
| 189 | 192 | $settings_url = admin_url( 'admin.php?page=wc-settings&tab=account' ); |
| 190 | 193 | |
| 191 | 194 | $requirement_html = '<div class="notice notice-warning is-dismissible">' . |
| 192 | - '<p>Enabling <strong>Account creation after checkout</strong> in WooCommerce settings may lead to issues with subscription orders for guest users.</p>' . | |
| 193 | - '<p>It\'s recommended to disable this option for optimal functionality with Subscriptions. Click <a href="' . $settings_url . '">here</a> to go to the settings.</p></div>'; | |
| 195 | + '<p>' . __( 'Enabling <strong>Account creation after checkout</strong> in WooCommerce settings may lead to issues with subscription orders for guest users.', 'subscription' ) . '</p>' . | |
| 196 | + '<p>' . sprintf( | |
| 197 | + /* translators: %s: URL of the WooCommerce account settings. */ | |
| 198 | + __( 'It\'s recommended to disable this option for optimal functionality with Subscriptions. Click <a href="%s">here</a> to go to the settings.', 'subscription' ), | |
| 199 | + esc_url( $settings_url ) | |
| 200 | + ) . '</p></div>'; | |
| 194 | 201 | |
| 195 | 202 | echo wp_kses_post( $requirement_html ); |
| 196 | 203 | } |
| 197 | 204 | } |