• Resolved howlegh

    (@howlegh)


    If I wanted to change the titles/labels of the fields (Expiry to Expiration Date, etc) in the Braintree CC processing part of the plugin, what would be the best way to do that without modifying the plugin itself?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor angelleye

    (@angelleye)

    The best way would be using filter hooks, but I don’t think we have any such hooks available for you right now unfortunately. I’ve add this to our list for the 1.4.7 update. https://github.com/angelleye/paypal-woocommerce/issues/898

    Thread Starter howlegh

    (@howlegh)

    I would appreciate it very much. It is a small thing but being able to use more familiar text for my US audience (Expiration rather than Expiry, etc) would probably help conversion.

    Plugin Contributor angelleye

    (@angelleye)

    We have added these hooks into the plugin, and they will be included in the 1.4.7 update that we’ll be releasing soon. Here is a quick usage guide:

    
    add_filter('cc_form_label_card_number', 'own_cc_form_label_card_code', 10, 2);
    add_filter('cc_form_label_card_code', 'own_cc_form_label_card_code', 10, 2);
    add_filter('cc_form_label_expiry', 'own_cc_form_label_expiry', 10, 2);
    
    function own_cc_form_label_card_code($lable, $gateway_id) {
    // $gateway_id value like braintree, paypal_pro, paypal_advanced, paypal_credit_card_rest, paypal_pro_payflow
    $lable = 'Test Card number';
    return $lable;
    }
    
    function cc_form_label_card_code($lable, $gateway_id) {
    // $gateway_id value like braintree, paypal_pro, paypal_advanced, paypal_credit_card_rest, paypal_pro_payflow
    $lable = 'Test Card Security Code';
    return $lable;
    }
    
    function own_cc_form_label_expiry($lable, $gateway_id) {
    // $gateway_id value like braintree, paypal_pro, paypal_advanced, paypal_credit_card_rest, paypal_pro_payflow
    $lable = 'Test Expiration Date';
    return $lable;
    }
    
Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Labels on fields’ is closed to new replies.