Get In Touch
MEDPIKE
info@medpike.com
Work Inquiries
job@medpike.com

Add attributes to our checkout fields in Woocomerce

function wc_add_checkout_add_ons_attributes( $checkout_fields ) {
$add_on_id = 2; // change 3 to your add-on id
//echo $checkout_fields[‘add_ons’][ ‘wc_checkout_add_ons_’ . $add_on_id ];

if ( isset( $checkout_fields[‘add_ons’][ ‘wc_checkout_add_ons_’ . $add_on_id ] ) ) {
$checkout_fields[‘add_ons’][ ‘wc_checkout_add_ons_’ . $add_on_id ][‘label’] = “Addon label-“;
}

$add_on_id = 3; // change 3 to your add-on id

//echo $checkout_fields[‘add_ons’][ ‘wc_checkout_add_ons_’ . $add_on_id ];

if ( isset( $checkout_fields[‘add_ons’][ ‘wc_checkout_add_ons_’ . $add_on_id ] ) ) {
$checkout_fields[‘add_ons’][ ‘wc_checkout_add_ons_’ . $add_on_id ][‘label’] = “Label2-“;
}

$add_on_id = 4; // change 3 to your add-on id

//echo $checkout_fields[‘add_ons’][ ‘wc_checkout_add_ons_’ . $add_on_id ];

if ( isset( $checkout_fields[‘add_ons’][ ‘wc_checkout_add_ons_’ . $add_on_id ] ) ) {
$checkout_fields[‘add_ons’][ ‘wc_checkout_add_ons_’ . $add_on_id ][‘label’] = “Label 3-“;

}

return $checkout_fields;
}
add_filter( ‘woocommerce_checkout_fields’, ‘wc_add_checkout_add_ons_attributes’, 20 );
*/

Author avatar
miguel
https://blog.medpike.com

Post a comment

Your email address will not be published. Required fields are marked *

seventeen − five =

  • Tureporti

    Radiology Second Opinions
    Tureporti
    Understanding radiology reports
    HIPAA ready
  • Radiolapp

    AI RIS-PACS On Demand
    Radiolapp
    Pay As You Go RIS-PACS
    AI included
© 2021, MEDPIKE. Made with passion by MEDPIKE.
All right reserved.
We use cookies to give you the best experience.