• hsb

    (@frogagainstthewar)


    Hi guys !

    It is possible to add translation for code content to WPML plugin ?
    I have this code below and want to change MY TEXT FRENCH to another language with WPML plugin. Can you help me with this ?
    Thanks!

    add_action( ‘woocommerce_review_order_before_submit’, ‘bbloomer_add_checkout_privacy_policy’, 9 );

    function bbloomer_add_checkout_privacy_policy() {

    woocommerce_form_field( ‘privacy_policy’, array(
    ‘type’ => ‘checkbox’,
    ‘class’ => array(‘form-row privacy’),
    ‘label_class’ => array(‘woocommerce-form__label woocommerce-form__label-for-checkbox checkbox’),
    ‘input_class’ => array(‘woocommerce-form__input woocommerce-form__input-checkbox input-checkbox’),
    ‘required’ => true,
    ‘label’ => ‘MY TEXT FRENCH’ ,
    ));

    }

    // Show notice if customer does not tick

    add_action( ‘woocommerce_checkout_process’, ‘bbloomer_not_approved_privacy’ );

    function bbloomer_not_approved_privacy() {
    if ( ! (int) isset( $_POST[‘privacy_policy’] ) ) {
    wc_add_notice( __( ‘Prosimy o zaznaczenie zgody’ ), ‘error’ );
    }
    }

Viewing 1 replies (of 1 total)
  • Plugin Author Shea Bunge

    (@bungeshea)

    Hi @frogagainstthewar,

    It’s been a while since you posted this, and I have been working on a solution, but honestly I am not super familiar with WPML or WooCommerce. I feel you might have more luck asking in a forum specific to either of those plugins, as the question you are asking is not specific to Code Snippets.

Viewing 1 replies (of 1 total)

The topic ‘Code Snippet & WPML’ is closed to new replies.