| |
| <?php
|
|
|
| add_action( 'wcv_product_options_general_product_data', 'wcv_product_hts_classification' );
|
| function wcv_product_hts_classification( $object_id ){
|
| WCVendors_Pro_Form_Helper::textarea( array(
|
| 'post_id' => $object_id,
|
| 'id' => 'wcv_custom_product_hts_classification',
|
| 'label' => __( 'HTS Classification', 'wcvendors-pro' ),
|
| 'placeholder' => __( 'Enter the HTS Classification number of this product here', 'wcvendors-pro' ),
|
| 'desc_tip' => 'true',
|
| 'description' => __( 'The product HTS Classification number', 'wcvendors-pro' ),
|
| ) );
|
| }
|
|
|
|
|
| add_action('woocommerce_product_meta_start', 'wcv_hts_classification', 2);
|
| function wcv_hts_classification() {
|
| $output = get_post_meta( get_the_ID(), 'wcv_custom_product_hts_classification', true );
|
| if ( ! empty( $output ) ) {
|
| echo 'HTS Classification: ' . esc_html( $output ) . '<br>';
|
| }
|
| }
|
|
|
|
|
|
|
| add_action( 'wcv_product_options_general_product_data', 'wcv_product_export_classification' );
|
| function wcv_product_export_classification( $object_id ){
|
| WCVendors_Pro_Form_Helper::textarea( array(
|
| 'post_id' => $object_id,
|
| 'id' => 'wcv_custom_product_export_classification',
|
| 'label' => __( 'Export Classification', 'wcvendors-pro' ),
|
| 'placeholder' => __( 'Enter the Export Classification number of this product here', 'wcvendors-pro' ),
|
| 'desc_tip' => 'true',
|
| 'description' => __( 'The product Export Classification number', 'wcvendors-pro' ),
|
| ) );
|
| }
|
|
|
|
|
| add_action('woocommerce_product_meta_start', 'wcv_export_classification', 2);
|
| function wcv_export_classification() {
|
| $output = get_post_meta( get_the_ID(), 'wcv_custom_product_export_classification', true );
|
| if ( ! empty( $output ) ) {
|
| echo 'Export Classification: ' . esc_html( $output ) . '<br>';
|
| }
|
| }
|
| |
| |
Comments