Category Archives: Wordpress

WordPress Elementor Popup issue with WPML translations

I came across with a issue on a WordPress theme, with Elementor and WPML.

The theme is using a POPUP for the some menus.
We have a PT and EN version with WPML.
We have created the translation to EN but it isn’t being printed by WP in the EN version of the site, just the PT version.

So, to use translated POPUPs, you might need to translate them under the default language of the WP.

store-mega-menu-en needs to be created under PT language…

To change instance – for the menu to be written on (the entire site)) this is how to change it

add postmeta on wp admin



add_filter('manage_post_posts_columns', function($columns) {
	return array_merge($columns, ['source_domain' => __('URL', 'textdomain')]);
});
 
add_action('manage_post_posts_custom_column', function($column_key, $post_id) {
	if ($column_key == 'source_domain') {
		$source_domain = get_post_meta($post_id, 'source_domain', true);
		//if ($source_domain == 1) {} else {}
		echo $source_domain;
	}
}, 10, 2);

As seen on

https://awhitepixel.com/blog/modify-add-custom-columns-post-list-wordpress-admin/

woocommerce – “I have read and agree to the website” always in english

This code that i’v found on github worked for me

if (!function_exists('My_terms_and_conditions_checkbox_text')) {
    function My_terms_and_conditions_checkbox_text( ) {
        return sprintf( __( 'I have read and agree to the website %s', 'woocommerce' ), '[terms]' ) ;
    }
}
add_filter('woocommerce_get_terms_and_conditions_checkbox_text', 'My_terms_and_conditions_checkbox_text', 10, 3);

https://github.com/woocommerce/woocommerce/issues/22127#issue-387480392