// Añadir el campo de "Ahorro Instantáneo" en la página de edición de producto function instant_savings_add_product_field() { woocommerce_wp_text_input( array( 'id' => '_instant_savings_amount', 'label' => 'Ahorro Instantáneo', 'desc_tip' => 'true', 'description' => 'Introduce la cantidad que se ahorra el cliente en este producto.', 'type' => 'number', 'custom_attributes' => array( 'step' => '0.01', 'min' => '0' ) )); } add_action( 'woocommerce_product_options_general_product_data', 'instant_savings_add_product_field', 20 ); // Guardar el valor del campo "Ahorro Instantáneo" function instant_savings_save_product_field( $post_id ) { // Verifica si el campo está presente en el formulario if ( isset( $_POST['_instant_savings_amount'] ) ) { $instant_savings = sanitize_text_field( $_POST['_instant_savings_amount'] ); update_post_meta( $post_id, '_instant_savings_amount', $instant_savings ); } } add_action( 'woocommerce_process_product_meta', 'instant_savings_save_product_field' ); Electronic Store, Tech Pc, Components, Laptop, Desktop – Page 6 – Computer Outlet PR

Processor AMD Ryzen 9 BUY NOW BUY NOW GEFORCE RTX 4090 BUY NOW MSI Laptop Gaming BUY NOW Processor Intel Core i9 BUY NOW Macbook Pro Chip M2

Top Categories Of The Month

Delivery In 3 To 4 Days
Shipping To The Entire Island
Secure Payment
100% Secure Payment
24/7 Support
Dedicated Support
Careplus+ Warranty
The Best Extended Warranty

Main Menu