html-order-download-permission.php
6 years ago
html-order-fee.php
3 months ago
html-order-item-meta.php
4 years ago
html-order-item.php
9 months ago
html-order-items.php
1 month ago
html-order-notes.php
1 month ago
html-order-refund.php
3 months ago
html-order-shipping.php
3 months ago
html-product-attribute-inner.php
1 month ago
html-product-attribute.php
3 years ago
html-product-data-advanced.php
5 months ago
html-product-data-attributes.php
1 month ago
html-product-data-general.php
2 months ago
html-product-data-inventory.php
4 months ago
html-product-data-linked-products.php
3 months ago
html-product-data-panel.php
1 year ago
html-product-data-shipping.php
3 years ago
html-product-data-variations.php
1 month ago
html-product-download.php
4 months ago
html-product-variation-download.php
4 months ago
html-variation-admin.php
1 month ago
html-product-data-panel.php
59 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Product data meta box. |
| 4 | * |
| 5 | * @package WooCommerce\Admin |
| 6 | */ |
| 7 | |
| 8 | if ( ! defined( 'ABSPATH' ) ) { |
| 9 | exit; |
| 10 | } |
| 11 | ?> |
| 12 | |
| 13 | <div class="panel-wrap product_data"> |
| 14 | |
| 15 | <span class="product-data-wrapper type_box hidden"> — |
| 16 | <label for="product-type"> |
| 17 | <select id="product-type" name="product-type"> |
| 18 | <optgroup label="<?php esc_attr_e( 'Product Type', 'woocommerce' ); ?>"> |
| 19 | <?php foreach ( wc_get_product_types() as $value => $label ) : ?> |
| 20 | <option value="<?php echo esc_attr( $value ); ?>" <?php echo selected( $product_object->get_type(), $value, false ); ?>><?php echo esc_html( $label ); ?></option> |
| 21 | <?php endforeach; ?> |
| 22 | </optgroup> |
| 23 | </select> |
| 24 | <span class="woocommerce-product-type-tip"></span> |
| 25 | </label> |
| 26 | |
| 27 | <?php |
| 28 | foreach ( self::get_product_type_options() as $key => $option ) : |
| 29 | if ( metadata_exists( 'post', $post->ID, '_' . $key ) ) { |
| 30 | $selected_value = is_callable( array( $product_object, "is_$key" ) ) ? $product_object->{"is_$key"}() : 'yes' === get_post_meta( $post->ID, '_' . $key, true ); |
| 31 | } else { |
| 32 | $selected_value = 'yes' === ( isset( $option['default'] ) ? $option['default'] : 'no' ); |
| 33 | } |
| 34 | ?> |
| 35 | <label for="<?php echo esc_attr( $option['id'] ); ?>" class="<?php echo esc_attr( $option['wrapper_class'] ); ?> tips has-checkbox" data-tip="<?php echo esc_attr( $option['description'] ); ?>"> |
| 36 | <input type="checkbox" name="<?php echo esc_attr( $option['id'] ); ?>" id="<?php echo esc_attr( $option['id'] ); ?>" data-product-type-option-id="<?php echo esc_attr( $option['id'] ); ?>" <?php echo checked( $selected_value, true, false ); ?> /> |
| 37 | <?php echo esc_html( $option['label'] ); ?> |
| 38 | </label> |
| 39 | <?php endforeach; ?> |
| 40 | </span> |
| 41 | |
| 42 | <ul class="product_data_tabs wc-tabs"> |
| 43 | <?php foreach ( self::get_product_data_tabs() as $key => $tab ) : ?> |
| 44 | <li class="<?php echo esc_attr( $key ); ?>_options <?php echo esc_attr( $key ); ?>_tab <?php echo esc_attr( isset( $tab['class'] ) ? implode( ' ', (array) $tab['class'] ) : '' ); ?>"> |
| 45 | <a href="#<?php echo esc_attr( $tab['target'] ); ?>"><span><?php echo esc_html( $tab['label'] ); ?></span></a> |
| 46 | </li> |
| 47 | <?php endforeach; ?> |
| 48 | <?php do_action( 'woocommerce_product_write_panel_tabs' ); ?> |
| 49 | </ul> |
| 50 | |
| 51 | <?php |
| 52 | self::output_tabs(); |
| 53 | self::output_variations(); |
| 54 | do_action( 'woocommerce_product_data_panels' ); |
| 55 | wc_do_deprecated_action( 'woocommerce_product_write_panels', array(), '2.6', 'Use woocommerce_product_data_panels action instead.' ); |
| 56 | ?> |
| 57 | <div class="clear"></div> |
| 58 | </div> |
| 59 |