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

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