Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

215
Views
¿Hay alguna forma de mostrar los cambios de precio de cada variación usando el complemento de muestras de variación en woocommerce?

Al usar el complemento de muestras de variación, creé las variaciones y luego agregué este código que muestra el precio en el encabezado.

 add_action('woocommerce_before_add_to_cart_form', 'selected_variation_price_replace_variable_price_range'); function selected_variation_price_replace_variable_price_range(){ global $product; if( $product->is_type('variable') ): ?><style> .woocommerce-variation-price {display:none;} </style> <script> jQuery(function($) { var p = 'p.price' q = $(p).html(); $('form.cart').on('show_variation', function( event, data ) { if ( data.price_html ) { $(p).html(data.price_html); } }).on('hide_variation', function( event ) { $(p).html(q); }); }); </script> <?php endif; }

visite este enlace por favor: https://onlinesanitarystore.com/product/iphone-12-pro-max/ Ahora quiero que si se selecciona la variación única, el precio debería cambiar con ella en el encabezado.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!