• This plugin works very well but I have a small question:

    How can i translate the Payment methods descriptions in Checkout Page?
    Everything is translated except these labels…

Viewing 1 replies (of 1 total)
  • I know this is kind of old at this point but since I’m here I may as well post it here since I was just looking at this stuff minutes ago. If it doesn’t help you anymore maybe it will help someone else some day.

    You can usually edit them in the WC settings on the Payments tab at /wp-admin/admin.php?page=wc-settings&tab=checkout

    You can also use the woocommerce_gateway_description filter like this:

    function my_woocommerce_gateway_description( $description, $id ) {
    	if ( $id === 'bacs' ) {
    		return 'My BACS description';
    	} else if ( $id === 'cheque' ) {
    		return 'My Check description';
    	} else if ( $id === 'cod' ) {
    		return 'My COD description';
    	} else if ( $id === 'paypal' ) {
    		return 'My PayPal description';
    	} else {
    		return $description;
    	}
    }
    
    add_filter( 'woocommerce_gateway_description', 'my_woocommerce_gateway_description', 10, 2 );

    You can do the same thing with icon (woocommerce_gateway_icon) and title (woocommerce_gateway_title) filters as well except with icons you would output an HTML img tag.

    WC 4.0.0 reference: wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-payment-gateway.php:304

Viewing 1 replies (of 1 total)
  • The topic ‘wc_payment_methods in Checkout page’ is closed to new replies.