__( 'Composable Options', 'wc-composable-product' ), 'target' => 'composable_product_data', 'class' => array( 'show_if_composable' ), 'priority' => 21, ); return $tabs; } /** * Add fields to general tab */ public function add_general_fields() { global $product_object; if ( $product_object && $product_object->get_type() === 'composable' ) { echo '
'; woocommerce_wp_text_input( array( 'id' => '_composable_selection_limit', 'label' => __( 'Selection Limit', 'wc-composable-product' ), 'description' => __( 'Maximum number of items customers can select. Leave empty to use global default.', 'wc-composable-product' ), 'desc_tip' => true, 'type' => 'number', 'custom_attributes' => array( 'min' => '1', 'step' => '1', ), ) ); woocommerce_wp_select( array( 'id' => '_composable_pricing_mode', 'label' => __( 'Pricing Mode', 'wc-composable-product' ), 'description' => __( 'How to calculate the price.', 'wc-composable-product' ), 'desc_tip' => true, 'options' => array( '' => __( 'Use global default', 'wc-composable-product' ), 'sum' => __( 'Sum of selected products', 'wc-composable-product' ), 'fixed' => __( 'Fixed price', 'wc-composable-product' ), ), ) ); woocommerce_wp_text_input( array( 'id' => '_regular_price', 'label' => __( 'Fixed Price', 'wc-composable-product' ) . ' (' . get_woocommerce_currency_symbol() . ')', 'description' => __( 'Enter the fixed price for this composable product.', 'wc-composable-product' ), 'desc_tip' => true, 'type' => 'text', 'data_type' => 'price', 'wrapper_class' => 'composable_fixed_price_field', ) ); echo '
'; } } /** * Add product data panel */ public function add_product_data_panel() { global $post; ?>