php - Style Echo in WooComerce -


i used code echo value custom field on woocomerce shop. have problem styleing text - how can ?

    // display fields add_action( 'woocommerce_product_options_general_product_data', 'woo_add_custom_general_fields' );  // save fields add_action( 'woocommerce_process_product_meta', 'woo_add_custom_general_fields_save' );  function woo_add_custom_general_fields() {      global $woocommerce, $post;      // text field     woocommerce_wp_textarea_input(         array(         'id'          => '_textarea',         'label'       => __( 'my textarea', 'woocommerce' ),         'placeholder' => '',         'desc_tip'    => 'true',         'description' => __( 'enter custom value here.', 'woocommerce' )     )     ); } function woo_add_custom_general_fields_save( $post_id ){      // textarea     $woocommerce_textarea = $_post['_textarea'];     if( !empty( $woocommerce_textarea ) )     update_post_meta( $post_id, '_textarea', esc_html( $woocommerce_textarea ) );  } 

woocommerce_wp_textarea_input accepts style , class parameters.

woocommerce_wp_textarea_input(         array(         'id'          => '_textarea',         'label'       => __( 'my textarea', 'woocommerce' ),         'placeholder' => '',         'desc_tip'    => 'true',         'description' => __( 'enter custom value here.', 'woocommerce' ),         'class' => 'special-class'     )     ); 

then item should wrapped in special-class class , can use css style way like.

.special-class {   border: 3px solid red; } 

Comments