pass full variation object into script instead of parts
This commit is contained in:
parent
2c023a2847
commit
b7d8091a44
|
@ -183,9 +183,7 @@
|
|||
$form.find( 'input[name="variation_id"], input.variation_id' ).val( '' ).change();
|
||||
} else {
|
||||
$single_variation.html( template( {
|
||||
price: variation.price_html,
|
||||
availability: variation.availability_html,
|
||||
description: variation.variation_description
|
||||
variation: variation
|
||||
} ) );
|
||||
$form.find( 'input[name="variation_id"], input.variation_id' ).val( variation.variation_id ).change();
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -16,15 +16,15 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
?>
|
||||
<script type="text/template" id="tmpl-variation-template">
|
||||
<div class="woocommerce-variation-description">
|
||||
{{{ data.description }}}
|
||||
{{{ data.variation.price_html }}}
|
||||
</div>
|
||||
|
||||
<div class="woocommerce-variation-price">
|
||||
{{{ data.price }}}
|
||||
{{{ data.variation.variation_description }}}
|
||||
</div>
|
||||
|
||||
<div class="woocommerce-variation-availability">
|
||||
{{{ data.availability }}}
|
||||
{{{ data.variation.availability_html }}}
|
||||
</div>
|
||||
</script>
|
||||
<script type="text/template" id="tmpl-unavailable-variation-template">
|
||||
|
|
Loading…
Reference in New Issue