Support » Plugin: Woo Pelecard Gateway » automatic language detection With WPML

Viewing 1 replies (of 1 total)
  • Plugin Author Ido Friedlander

    (@idofri)

    You could accomplish that with the following snippet of code:

    add_filter( 'wc_pelecard_gateway_iframe_args', function( $args ) {
    	if ( defined( 'ICL_LANGUAGE_CODE' ) && in_array( ICL_LANGUAGE_CODE, array( 'he', 'en', 'ru' ) ) ) {
    		$args['Language'] = strtoupper( ICL_LANGUAGE_CODE );
    	}
    	return $args;
    });
Viewing 1 replies (of 1 total)
  • The topic ‘automatic language detection With WPML’ is closed to new replies.