post custom data when fetching a variation via ajax
Sometimes it is needed to add "context" to a variations ajax request, in order modify the returned object content. For instance, in cases where the variation is part of a bundled variable product, we may need to modify the price, stock status or the description of the variation according to the "context".
This commit is contained in:
parent
1ff19a31b1
commit
982e2011a6
|
@ -116,7 +116,8 @@
|
|||
|
||||
if ( all_attributes_chosen ) {
|
||||
// Get a matchihng variation via ajax
|
||||
data.product_id = $product_id;
|
||||
data.product_id = $product_id;
|
||||
data.custom_data = $form.data( 'custom_data' );
|
||||
|
||||
$( '.variations_form' ).block({
|
||||
message: null,
|
||||
|
|
Loading…
Reference in New Issue