Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn’t support cyrillic url #2091

Closed
BlackCatBLR opened this issue Sep 13, 2023 · 4 comments
Closed

Doesn’t support cyrillic url #2091

BlackCatBLR opened this issue Sep 13, 2023 · 4 comments

Comments

@BlackCatBLR
Copy link

BlackCatBLR commented Sep 13, 2023

Describe the bug:

if attribute slug contents cyrillic letter, he is coding url twice, in result merchant center cant open variation product url

Steps to reproduce:

  1. Create attribute with cyrillic letter in slug and use it for variation
  2. Send this variation in mercant center

Expected behavior:

The merchant center receives this URL:
?attribute_pa_buy-bottle=75%D0%BC%D0%BB-%D0%BF%D0%B0%D1%80%D1%84%D1%8E%D0%BC%D0%B5%D1%80%D0%BD%D0%B0%D1%8F-%D0%B2%D0%BE%D0%B4%D0%B0

Actual behavior:

The merchant center receives this URL:
%3Fattribute_pa_buy-bottle%3D75%25D0%25BC%25D0%25BB-%25D0%25BF%25D0%25B0%25D1%2580%25D1%2584%25D1%258E%25D0%25BC%25D0%25B5%25D1%2580%25D0%25BD%25D0%25B0%25D1%258F-%25D0%25B2%25D0%25BE%25D0%25B4%25D0%25B0

Additional details:

i use plugin for create feed, in this plugin i have this problem too
i search place where plugin generate url for feed and use php decoding

`

	$result_url = htmlspecialchars( get_permalink( $this->get_offer()->get_id() ) );
	$result_url = apply_filters( 'xfgmc_url_filter_var', $result_url, $this->get_product(), $this->get_offer(), $this->get_cat_id(), $this->get_feed_id() ); 
	$result_url=urldecode($result_url); //decoding url with cyrilic letter, if url doesnt have cyrylic letter decoding for latin letters does nothing
	$result_xml_url = new XFGMC_Get_Paired_Tag( 'g:link', $result_url );
	return $result_xml_url;

`

@martynmjones
Copy link
Contributor

Hi @BlackCatBLR, thank you for logging the issue here on GitHub.

I'm trying to reproduce the issue so that we can understand what's happening, however, I have not yet been able to.

Using the example you gave, I created a variable product and used 75мл-парфюмерная-вода as the attribute value. After that product was synced I can see the URL of it in Merchant Center as ?attribute_test=75%D0%BC%D0%BB-%D0%BF%D0%B0%D1%80%D1%84%D1%8E%D0%BC%D0%B5%D1%80%D0%BD%D0%B0%D1%8F-%D0%B2%D0%BE%D0%B4%D0%B0 which is expected and clicking it loads the specific variation.

Could you please share a few more details about how you've configured you're product? Additionally, can you please let us know what version of Google Listings & Ads and WooCommerce you have installed on your website?

@BlackCatBLR
Copy link
Author

Wordpress 6.3.1
Woocommerce 8.0.3
Google Listings and Ads 2.5.4

If you cannot reproduce this problem, it may be due to my other plugins, theme, etc. I started working with this site already when it had this problem. In this case, the problem can be closed. I’ll try to look for a plugin/theme/hook that breaks the work of your plugin. If I find the reason, I’ll let you know.

@BlackCatBLR
Copy link
Author

Maybe you can tell me in which file the URL for sending is generated. So that I can fix the problem on my site?

@martynmjones
Copy link
Contributor

I’ll try to look for a plugin/theme/hook that breaks the work of your plugin. If I find the reason, I’ll let you know.

That is a common issue we see merchants encounter and it can unfortunately be quite difficult to get to the bottom of sometimes.

You could perform a conflict test to determine if the theme or another plugin is causing the problem. You would need to re-sync the product you mentioned after each activation and wait for Merchant Center to update which you could do using the product sync tool at the bottom of the connection test page found at /wp-admin/admin.php?page=connection-test-admin-page.

Maybe you can tell me in which file the URL for sending is generated. So that I can fix the problem on my site?

Google Listings & Ads maps WooCommerce Product attributes to the Google Product Class to be synced in a file called WCProductAdapter.php. For the title, it maps the value directly from the WooCommerce Product class without modifying it. Other plugins would be able to modify the title using core WooCommerce filters which could be what's happening on your site.

I hope that helps point you in the right direction so that you can resolve the issue on your site. I'll close this issue as we aren't able to offer support on GitHub but if you have any further questions or need any other help please open a support request on WooCommerce.com.

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

No branches or pull requests

2 participants