fburatti
Forum Replies Created
-
Forum: Plugins
In reply to: [Brevo for WooCommerce] uncheck Sync eCommerce attributesIf I activate contacts synchronization, orders synchronization is also automatically activated, and it is no longer possible to deactivate it. What I would like is to completely disable Brevo tracking and statistics. In the old plugin this was possible some time ago.
I confirm the serious error in the plugin code found in src/managers/cart-events-manager.php in the add_optin_billing() function which should return an array of checkout fields: in this function no output should be printed on the screen and instead is used to print the hidden field “ws_opt_in_nonce” which is thus incorrectly inserted in the wrong position in the head of the page.
Please remove this gross error!!!
Hi @glx77 , with the current version of the weglot plugin (4.0.2) installed, I wrote this code and the yoast sitemap is now modified as I would like and as it should be according to google guidelines, without creating duplicate sitemaps:
add_filter( 'wpseo_sitemap_url', 'weglot_sitemap', 10, 2 ); function weglot_sitemap ($output, $url) { $date = null; if ( ! empty( $url['mod'] ) ) { $date = date( 'c', strtotime( $url['mod'] ) ); } $languages = weglot_get_destination_languages(); $language_services = weglot_get_service( 'Language_Service_Weglot' ); $request_url_services = weglot_get_service( 'Request_Url_Service_Weglot' ); foreach ($languages as $language) { $wg_url = $request_url_services->create_url_object( $url['loc'] ); $lang = $language_services->get_language_from_internal($language['language_to']); $output .= "\t<url>\n"; $output .= "\t\t<loc>" . $wg_url->getForLanguage( $lang ) . "</loc>\n"; $output .= empty( $date ) ? '' : "\t\t<lastmod>" . htmlspecialchars( $date ) . "</lastmod>\n"; $images = ''; if( isset($url['images']) && is_array($url['images']) ){ foreach ($url['images'] as $image) { $images .= "<image:image><image:loc>{$image['src']}</image:loc></image:image>\n"; } $output .= $images; } $output .= "\t</url>\n"; } return $output; }
However I don’t know if my code can be rewritten in a more performant way. Furthermore, it does not take into account any url excluded from the translation. Maybe you can take a look at it.
Thanks for the fast support @glx77 !
If I’m not too picky, I have a note on this update which imho is still not perfect.
Rather than duplicating the sitemap in the destination languages, it would be necessary to merge all the urls (original language + destination languages) into a single sitemap, as happens in other multilingual plugins (e.g. wpml).
In this case maybe yoast’s filter ‘wpseo_sitemap_url’ can help.
hi @glx77 , I’m considering buying weglot and I’ve tried your code snippet, but it doesn’t do what @yogid asked.Your code adds an additional page-sitemap.xml entry for each destination language, but inside it still contains the urls of the pages in the original language, this is not useful at all.
Weglot should automatically add the translated urls together with the original urls, and in addition to the pages also for the posts, categories and for any other content such as woocommerce products.
Forum: Plugins
In reply to: [Brevo for WooCommerce] Error with rewrite rulesTo replicate the problem, just install any plugin that uses the rewrite_rules_array filter together with Sendinblue for Wocommerce.
For example this simple plugin, Disable Embeds
Hurry up! It’s been over 5 months and you still haven’t released a patch!
Forum: Plugins
In reply to: [Brevo for WooCommerce] Bug introduced in rewrite rulesAfter 5 months this serious problem is still present.
The culprit function is sendinblue_woocommerce_rewrites() on line 144 of the woocommerce-sendinblue.php file (plugin version 3.0.6).As already mentioned, the plugin is adding an array to the rewrite rules values, which is expected to be an array of strings. So any plugin filtering rewrite rules and processing them as strings (since that what it should be) will have a fatal error raised.
if you’re just adding rules and not manipulating existing rules or reordering, it would be better to use the core function add_rewrite_rule() instead of the “rewrite_rules_array” filter.
However the function should be fixed like this to avoid any fatal error:
function sendinblue_woocommerce_rewrites($wp_rules) { // wrong /* $wp_rules[] = array( "sendinblue-callback\$" => 'index.php?pagename=sendinblue-callback' );*/ // right $wp_rules["sendinblue-callback\$"] = 'index.php?pagename=sendinblue-callback'; return $wp_rules; }
I hope that an update with the fix will be released as soon as possible!!!
Forum: Developing with WordPress
In reply to: Disabling Gutenberg Duotone Filter?I don’t use Gutemberg (i love classic editor) so i think it may be safe to do like this:
remove_filter( 'render_block', 'wp_render_duotone_support', 10);
so the duotone svg in the footer disappears!
Forum: Plugins
In reply to: [Quiz Maker] Autofill logged in user data doesn’t workThank you very much!
Forum: Plugins
In reply to: [Quiz Maker] Autofill logged in user data doesn’t workThanks
this is the link where i am trying.
I also temporarily enabled registration to allow you to create a subscriber user and login to the quizadd_action( 'wp_print_styles', 'fb_woocommerce_multilingual_styles_cleaner', 100 ); function fb_woocommerce_multilingual_styles_cleaner() { wp_deregister_style( 'wcml-dropdown-0' ); }
I also removed this:
function fb_woocommerce_multilingual_script_cleaner() { wp_dequeue_script( 'cart-widget' ); wp_dequeue_script( 'wcml-front-scripts' ); wp_dequeue_script('wcml-pointer'); } add_action( 'wp_enqueue_scripts', 'fb_woocommerce_multilingual_script_cleaner', 99 );
Forum: Plugins
In reply to: [qTranslate X] Category description – language switcher doesn’t workI found a fix!
go to qtranslate-x / admin / qtx_admin.php
comment out line 567:
add_action ('admin_print_footer_scripts', 'qtranxf_admin_footer', 999);
comment line 568:
// Add_action ('admin_footer', 'qtranxf_admin_footer', 999);
in this way the language switch and the editor seem to work together, however you have to check if this triggers problems elsewhere.
Forum: Plugins
In reply to: [qTranslate X] Category description – language switcher doesn’t workOne idea would be to modify Yoast Seo (through wordpress hooks) to disable the TinyMCE editor for the taxonomy description.
I have to give it a try.It would be a real shame if qtranslate-x was dead: now it works quite well, but as said Unicco there are some compatibility issues with Yoast Seo.
I’m still using qtranslate-x, but I’m worried about the future, I don’t want migrate to WPML, one of the worst plugin that I know, is not user friendly and requires a lot of additional database queries.