Skip to content

Stop adding a language code to optimole.com links - #1243

Open
selul wants to merge 1 commit into
developmentfrom
fix/upgrade-link-locale-prefix
Open

selul wants to merge 1 commit into
developmentfrom
fix/upgrade-link-locale-prefix

Conversation

@selul

@selul selul commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

The plugin added a language code to optimole.com links for seven languages, and added it twice to three upgrade links (/de/de/upgrade, a 404). optimole.com has no translated pages, so these links now have no language code.

Note

The doubled code was added in 063d888 on version 4.1.3 (2025-11-05).

What changed

  • Upgrade link (Optml_Admin::get_upgrade_base_link()): is https://optimole.com/upgrade/?email=… for every language. Before, a German admin got https://optimole.com/de/upgrade?email=….

  • Upgrade notice in the Media Library, Black Friday sidebar offer, disabled-account notice: use the upgrade link as it is. Before, each one translated the link a second time and pointed to /de/de/upgrade.

  • Dashboard data (optimoleHome, offload_upgrade_url, signup_terms): the home, pricing, terms and privacy links have no language code. The dashboard builds its footer and support links from optimoleHome, so those links change too.

  • Contact link (Optml_Admin::get_contact_base_link()): is https://optimole.com/contact/, with no language code and with a trailing slash.

  • Frontend badge (Optml_Manager::banner()): links to https://optimole.com/wordpress/?from=badgeOn for every site language.

Note

The seven languages are the ones that tsdk_translate_link() knows: de, es, fr, it, ja, nl and ro.

Links to dashboard.optimole.com do not change. Most of them carry the language as ?lang=de. Two of them (dashboardURL and optimoleDashMetrics) use the path mode, and this PR does not change them.

Today optimole.com redirects most paths that have one language code to the page without the code. The home link is the exception: /ja/ is a 404, and /de/ opens an unrelated page.

The Black Friday sidebar offer is one of the three doubled links. This year the sale week starts on 2026-11-23.

QA

Use a site that is connected to an Optimole account on the free plan.

  1. Go to WP Admin → Settings → General (/wp-admin/options-general.php). Set Site Language to Deutsch. Save the settings.

    Expect: the admin is in German.

  2. Create the file wp-content/mu-plugins/optml-bf.php with the content below. Then go to WP Admin → Optimole (/wp-admin/admin.php?page=optimole).

    <?php
    add_filter( 'themeisle_sdk_is_black_friday_sale', '__return_true', 99 );

    Expect: the upgrade box in the sidebar shows a black strip with the promo code BFCM2525.

  3. Click that black strip.

    Expect: the upgrade page opens, and its address starts with https://optimole.com/upgrade/?email=. Before this change, the address started with https://optimole.com/de/de/upgrade and the page was a 404.

  4. Delete the file wp-content/mu-plugins/optml-bf.php. Reload the Optimole page. Click the button in the upgrade box (View plans in English).

    Expect: the black strip is gone, and the upgrade page opens at an address that starts with https://optimole.com/upgrade/?email=.

  5. In the page footer, click the first link. It shows the plugin name and version.

    Expect: the Optimole home page opens at https://optimole.com/. Before this change, https://optimole.com/de/ opened an unrelated page.

  6. In the same footer, click each of the next three links.

    Expect: the terms page, the privacy page and the test-drive page open. No address contains /de/.

  7. Go to WP Admin → Optimole → Settings → General (/wp-admin/admin.php?page=optimole#settings). Turn on the badge option (Enable Optimole Badge in English). Save the settings.

    Expect: the option stays on after a page reload.

  8. Open the site home page in a private window. Copy the link address of the badge in the bottom corner.

    Expect: the address is https://optimole.com/wordpress/?from=badgeOn.

🤖 Generated with Claude Code

optimole.com has no translated pages, but the plugin passed its links
through tsdk_translate_link(), which puts the language code in the path
for de, es, fr, it, ja, nl and ro users. Three upgrade links were
translated twice and pointed to /de/de/upgrade, which is a 404.

The upgrade, contact, home, pricing, terms, privacy and badge links now
have no language code. Links to dashboard.optimole.com are unchanged.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@pirate-bot

Copy link
Copy Markdown
Collaborator

Plugin build for 652b0ec is ready 🛎️!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants