'_product_url', 'value' => is_callable( array( $product_object, 'get_product_url' ) ) ? $product_object->get_product_url( 'edit' ) : '', 'label' => __( 'Product URL', 'woocommerce' ), 'placeholder' => 'https://', 'description' => __( 'Enter the external URL to the product.', 'woocommerce' ), ) ); woocommerce_wp_text_input( array( 'id' => '_button_text', 'value' => is_callable( array( $product_object, 'get_button_text' ) ) ? $product_object->get_button_text( 'edit' ) : '', 'label' => __( 'Button text', 'woocommerce' ), 'placeholder' => _x( 'Buy product', 'placeholder', 'woocommerce' ), 'description' => __( 'This text will be shown on the button linking to the external product.', 'woocommerce' ), ) ); do_action( 'woocommerce_product_options_external' ); ?>
get( CostOfGoodsSoldController::class ); $cogs_is_enabled = $cogs_controller->feature_is_enabled(); ?>
'_regular_price', 'value' => $product_object->get_regular_price( 'edit' ), 'label' => __( 'Regular price', 'woocommerce' ) . ' (' . get_woocommerce_currency_symbol() . ')' . $tax_label, 'data_type' => 'price', ) ); woocommerce_wp_text_input( array( 'id' => '_sale_price', 'value' => $product_object->get_sale_price( 'edit' ), 'data_type' => 'price', 'label' => __( 'Sale price', 'woocommerce' ) . ' (' . get_woocommerce_currency_symbol() . ')' . $tax_label, 'description' => '' . __( 'Schedule', 'woocommerce' ) . '', ) ); $sale_price_dates_from_timestamp = $product_object->get_date_on_sale_from( 'edit' ) ? $product_object->get_date_on_sale_from( 'edit' )->getOffsetTimestamp() : false; $sale_price_dates_to_timestamp = $product_object->get_date_on_sale_to( 'edit' ) ? $product_object->get_date_on_sale_to( 'edit' )->getOffsetTimestamp() : false; $sale_price_dates_from = $sale_price_dates_from_timestamp ? date_i18n( 'Y-m-d', $sale_price_dates_from_timestamp ) : ''; $sale_price_dates_to = $sale_price_dates_to_timestamp ? date_i18n( 'Y-m-d', $sale_price_dates_to_timestamp ) : ''; // phpcs:disable WooCommerce.Commenting.CommentHooks.MissingSinceComment /** * Hook to customize the regular expression that validates dates entered in the WooCommerce admin editors. * * @param string $pattern Default pattern to use. */ $date_input_html_pattern = apply_filters( 'woocommerce_date_input_html_pattern', '[0-9]{4}-(0[1-9]|1[012])-(0[1-9]|1[0-9]|2[0-9]|3[01])' ); echo '

' . wc_help_tip( __( 'The sale will start at 00:00:00 of "From" date and end at 23:59:59 of "To" date.', 'woocommerce' ) ) . ' ' . esc_html__( 'Cancel', 'woocommerce' ) . '

'; /** * Action that allows to render additional fields for price related settings in the product editor. */ do_action( 'woocommerce_product_options_pricing' ); // phpcs:enable WooCommerce.Commenting.CommentHooks.MissingSinceComment ?>
'_tax_status', 'value' => $product_object->get_tax_status( 'edit' ), 'label' => __( 'Tax status', 'woocommerce' ), 'options' => array( ProductTaxStatus::TAXABLE => __( 'Taxable', 'woocommerce' ), ProductTaxStatus::SHIPPING => __( 'Shipping only', 'woocommerce' ), ProductTaxStatus::NONE => _x( 'None', 'Tax status', 'woocommerce' ), ), 'desc_tip' => 'true', 'description' => __( 'Define whether or not the entire product is taxable, or just the cost of shipping it.', 'woocommerce' ), ) ); woocommerce_wp_select( array( 'id' => '_tax_class', 'value' => $product_object->get_tax_class( 'edit' ), 'label' => __( 'Tax class', 'woocommerce' ), 'options' => wc_get_product_tax_class_options(), 'desc_tip' => 'true', 'description' => __( 'Choose a tax class for this product. Tax classes are used to apply different tax rates specific to certain types of product.', 'woocommerce' ), ) ); do_action( 'woocommerce_product_options_tax' ); ?>