WordPress issueshttps://lab.civicrm.org/dev/wordpress/-/issues2024-02-19T18:33:21Zhttps://lab.civicrm.org/dev/wordpress/-/issues/133WPML URL Integration for CiviCRM2024-02-19T18:33:21ZshaneonabikeWPML URL Integration for CiviCRM## Overview
When using WPML language plugin in conjunction with CiviCRM the generated translated URLs are incorrect. All the translated URLs point to the CiviCRM page rather than the proper translated CiviCRM event, contribution, or oth...## Overview
When using WPML language plugin in conjunction with CiviCRM the generated translated URLs are incorrect. All the translated URLs point to the CiviCRM page rather than the proper translated CiviCRM event, contribution, or other page.
This isn't ideal and confusing for most users as they attempt to navigate to the translated CiviCRM page.
There is already integration for Polylang, but not integration presently for WPML.
WPML handles URLs in three different ways:
+ Attaching a language parameter to the end of the url ```lang=xyz```
+ Attaching a language in the path of the url ```https://test.dev/fr/civicrm/event/info/?reset=1&id=1```
+ Allowing for different domains for each language ```https://fr.test.dev/civicrm/event/info/?reset=1&id=1```
## Before
Viewing the page ```https://test.dev/civicrm/event/info/?reset=1&id=1```, and clicking on the WPML language link will take you to ```https://test.dev/civicrm/```
## After
The new code (I will attach the PR to this ticket shortly) will provide the proper integration for the defined scenarios above.
## Testing
I have tested this in the following scenarios, but maybe others want to test a bit larger?
+ Multiple domains while viewing (Events page)
+ Language placed in the URL (Events page)
+ Language within the proper path
+ Multisite installation with one site using WPML and CiviCRM Events
I don't believe that the path construction is any different for Contribution and other CiviCRM public pages, but I could be wrong.https://lab.civicrm.org/dev/wordpress/-/issues/74IPN/webhook URLs should not be localized2020-09-04T10:33:07Zmattwiremjw@mjwconsult.co.ukIPN/webhook URLs should not be localizedOn a site with polylang enabled Stripe displays an error that the webhook path is not setup correctly because it returns the first, default locale URL.
Example: https://sitename.org/en/civicrm/payment/ipn/1/
But the non-localized https...On a site with polylang enabled Stripe displays an error that the webhook path is not setup correctly because it returns the first, default locale URL.
Example: https://sitename.org/en/civicrm/payment/ipn/1/
But the non-localized https://sitename.org/civicrm/payment/ipn/1/ also works as well as other locales.
Calls to `CRM_Utils_System::url()` generate a localized URL and there doesn't seem to be a way to ask for a specific locale (or default) - see https://lab.civicrm.org/extensions/mjwshared/-/blob/master/CRM/Mjwshared/WebhookTrait.php#L27
Not sure what the solution is here - @haystack @kcristiano - it causes Stripe to display errors about webhook configuration when it doesn't need to. Updating the webhook works too but is not actually necessary.