Skip to content

Commit

Permalink
STRF-12475: Add postFormData for cart.php to stencil-utils
Browse files Browse the repository at this point in the history
  • Loading branch information
jordanarldt committed Dec 17, 2024
1 parent d993ddc commit 5a9949a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/api/cart.js
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,16 @@ export default class extends Base {
this.remoteRequest('/cart/update', 'POST', { params: payload }, callback);
}

/**
* POST form data to /cart.php
*
* @param {FormData} formData
* @param {Function} callback
*/
postFormData(formData, callback) {
this.makeRequest('/cart.php', 'POST', { formData }, false, callback);
}

/**
* Get cart content
*
Expand Down

0 comments on commit 5a9949a

Please sign in to comment.