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-advanced.php
95 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Product advanced data panel. |
| 4 | * |
| 5 | * @package WooCommerce\Admin |
| 6 | * @var WC_Product $product_object |
| 7 | */ |
| 8 | |
| 9 | use Automattic\WooCommerce\Utilities\FeaturesUtil; |
| 10 | |
| 11 | if ( ! defined( 'ABSPATH' ) ) { |
| 12 | exit; |
| 13 | } |
| 14 | ?> |
| 15 | <div id="advanced_product_data" class="panel woocommerce_options_panel hidden"> |
| 16 | |
| 17 | <div class="options_group hide_if_external hide_if_grouped"> |
| 18 | <?php |
| 19 | woocommerce_wp_textarea_input( |
| 20 | array( |
| 21 | 'id' => '_purchase_note', |
| 22 | 'value' => $product_object->get_purchase_note( 'edit' ), |
| 23 | 'label' => __( 'Purchase note', 'woocommerce' ), |
| 24 | 'desc_tip' => true, |
| 25 | 'description' => __( 'Enter an optional note to send the customer after purchase.', 'woocommerce' ), |
| 26 | ) |
| 27 | ); |
| 28 | ?> |
| 29 | </div> |
| 30 | |
| 31 | <div class="options_group"> |
| 32 | <?php |
| 33 | woocommerce_wp_text_input( |
| 34 | array( |
| 35 | 'id' => 'menu_order', |
| 36 | 'value' => $product_object->get_menu_order( 'edit' ), |
| 37 | 'label' => __( 'Menu order', 'woocommerce' ), |
| 38 | 'desc_tip' => true, |
| 39 | 'description' => __( 'Custom ordering position.', 'woocommerce' ), |
| 40 | 'type' => 'number', |
| 41 | 'custom_attributes' => array( |
| 42 | 'step' => '1', |
| 43 | ), |
| 44 | ) |
| 45 | ); |
| 46 | ?> |
| 47 | </div> |
| 48 | |
| 49 | <?php if ( post_type_supports( 'product', 'comments' ) ) : ?> |
| 50 | <div class="options_group reviews"> |
| 51 | <?php |
| 52 | woocommerce_wp_checkbox( |
| 53 | array( |
| 54 | 'id' => 'comment_status', |
| 55 | 'value' => $product_object->get_reviews_allowed( 'edit' ) ? 'open' : 'closed', |
| 56 | 'label' => __( 'Enable reviews', 'woocommerce' ), |
| 57 | 'cbvalue' => 'open', |
| 58 | ) |
| 59 | ); |
| 60 | do_action( 'woocommerce_product_options_reviews' ); |
| 61 | ?> |
| 62 | </div> |
| 63 | <?php endif; ?> |
| 64 | <?php if ( FeaturesUtil::feature_is_enabled( 'point_of_sale' ) ) : ?> |
| 65 | <?php $is_pos_supported = $product_object->is_type( array( 'simple', 'variable' ) ) && ! $product_object->is_downloadable(); ?> |
| 66 | <div class="options_group" id="pos_visibility_supported" <?php echo $is_pos_supported ? '' : 'style="display: none;"'; ?>> |
| 67 | <?php |
| 68 | $visible_in_pos = ! has_term( 'pos-hidden', 'pos_product_visibility', $product_object->get_id() ); |
| 69 | woocommerce_wp_checkbox( |
| 70 | array( |
| 71 | 'id' => '_visible_in_pos', |
| 72 | 'value' => $visible_in_pos ? 'yes' : 'no', |
| 73 | 'label' => __( 'Available for POS', 'woocommerce' ), |
| 74 | 'desc_tip' => true, |
| 75 | 'description' => __( 'Controls whether this product appears in the Point of Sale system.', 'woocommerce' ), |
| 76 | ) |
| 77 | ); |
| 78 | ?> |
| 79 | </div> |
| 80 | <div class="options_group" id="pos_visibility_unsupported" <?php echo $is_pos_supported ? 'style="display: none;"' : ''; ?>> |
| 81 | <?php |
| 82 | woocommerce_wp_note( |
| 83 | array( |
| 84 | 'id' => '_pos_visibility_note', |
| 85 | 'label' => __( 'Point of Sale', 'woocommerce' ), |
| 86 | 'message' => __( 'This product type is not currently supported.', 'woocommerce' ), |
| 87 | ) |
| 88 | ); |
| 89 | ?> |
| 90 | </div> |
| 91 | <?php endif; ?> |
| 92 | |
| 93 | <?php do_action( 'woocommerce_product_options_advanced' ); ?> |
| 94 | </div> |
| 95 |