Add a checkbox on single product pages that adds an additional cost in Woocommerce
In woocommerce, I am using the following code to display an input text field on admin product edit pages, that allow me to add an additonal pricing option to the product: add_action( 'woocommerce_product_options_pricing', 'wc_cost_product_field' ); function wc_cost_product_field() { woocommerce_wp_text_input( array( 'id' => 'repair_price', 'class' => 'wc_input_price short', 'label' => __( 'Repair Cost', 'woocommerce' ) . ' (' . get_woocommerce_currency_symbol() . ')' ) ); } add_action( 'save_post', 'wc_cost_save_product' ); function wc_cost_save_product( $product_id ) { // stop the quick edit