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rc.2 3.1.0 6.2.1 3.1.1 6.2.2 3.1.2 6.2.3 3.2.0 6.3.0 3.2.1 6.3.0-beta.1 3.2.2 6.3.0-rc.1 3.2.3 6.3.0-rc.2 3.2.4 6.3.1 3.2.5 6.3.2 3.2.6 6.4.0 3.3.0 6.4.0-beta.1 3.3.1 6.4.0-rc.1 3.3.2 6.4.1 3.3.2-rc.1 6.4.2 3.3.3 6.5.0 3.3.4 6.5.0-beta.1 3.3.5 6.5.0-rc.1 3.3.6 6.5.0-rc.2 3.4.0 6.5.1 3.4.0-beta.1 6.5.2 3.4.0-rc.2 6.6.0 3.4.1 6.6.0-beta.1 3.4.2 6.6.0-rc.1 3.4.3 6.6.0-rc.2 3.4.4 6.6.1 3.4.5 6.6.2 3.4.6 6.7.0 3.4.7 6.7.0-beta.1 3.4.8 6.7.0-beta.2 3.5.0 6.7.0-rc.1 3.5.0-beta.1 6.7.1 3.5.0-rc.1 6.8.0 3.5.0-rc.2 6.8.0-beta.1 3.5.1 6.8.0-beta.2 3.5.10 6.8.0-rc.1 3.5.2 6.8.1 3.5.3 6.8.2 3.5.4 6.8.3 3.5.5 6.9.0 3.5.6 6.9.0-beta.1 3.5.7 6.9.0-beta.2 3.5.8 6.9.0-rc.1 3.5.9 6.9.1 3.6.0 6.9.2 3.6.0-beta.1 6.9.3 3.6.0-rc.1 6.9.4 3.6.0-rc.2 6.9.5 3.6.0-rc.3 7.0.0 3.6.1 7.0.0-beta.1 3.6.2 7.0.0-beta.2 3.6.3 7.0.0-beta.3 3.6.4 7.0.0-rc.1 3.6.5 7.0.0-rc.2 3.6.6 7.0.1 3.6.7 7.0.2 3.7.0 7.1.0 3.7.0-beta.1 7.1.0-beta.1 3.7.0-rc.1 7.1.0-beta.2 3.7.0-rc.2 7.1.0-rc.1 3.7.1 7.1.0-rc.2 3.7.2 7.1.1
woocommerce / assets / client / blocks / coupon-code.js
woocommerce / assets / client / blocks Last commit date
@woocommerce 1 month ago accordion-group 1 year ago accordion-header 1 year ago accordion-item 1 year ago accordion-panel 1 year ago active-filters 1 year ago add-to-cart-form 1 year ago add-to-cart-with-options 5 months ago add-to-cart-with-options-grouped-product-item 1 year ago add-to-cart-with-options-grouped-product-item-label 1 year ago add-to-cart-with-options-grouped-product-item-selector 1 year ago add-to-cart-with-options-grouped-product-selector 10 months ago add-to-cart-with-options-quantity-selector 1 month ago add-to-cart-with-options-variation-description 9 months ago add-to-cart-with-options-variation-selector 10 months ago add-to-cart-with-options-variation-selector-attribute 1 month ago add-to-cart-with-options-variation-selector-attribute-name 1 year ago add-to-wishlist-button 1 month ago all-products 1 year ago all-reviews 1 year ago attribute-filter 1 year ago breadcrumbs 1 year ago cart-link 3 months ago catalog-sorting 1 month ago category-description 7 months ago category-title 7 months ago checkout 3 months ago classic-shortcode 1 year ago coming-soon 1 year ago coupon-code 2 months ago customer-account 3 months ago dropdown 1 month ago email-content 5 months ago featured-category 7 months ago featured-product 7 months ago filter-wrapper 1 year ago handpicked-products 1 year ago inner-blocks 2 months ago mini-cart 3 months ago mini-cart-contents 3 months ago mini-cart-contents-block 1 month ago order-confirmation-additional-fields 1 year ago order-confirmation-additional-fields-wrapper 1 year ago order-confirmation-additional-information 1 year ago order-confirmation-billing-address 1 year ago order-confirmation-billing-wrapper 1 year ago order-confirmation-create-account 1 year ago order-confirmation-downloads 1 year ago order-confirmation-downloads-wrapper 1 year ago order-confirmation-shipping-address 1 year ago order-confirmation-shipping-wrapper 1 year ago order-confirmation-status 1 year ago order-confirmation-summary 1 year ago order-confirmation-totals 1 year ago order-confirmation-totals-wrapper 1 year ago page-content-wrapper 1 year ago payment-method-icons 11 months ago price-filter 1 year ago product-average-rating 1 year ago product-best-sellers 1 year ago product-button 7 months ago product-categories 1 year ago product-category 1 year ago product-collection 3 weeks ago product-collection-no-results 9 months ago product-description 1 year ago product-details 11 months ago product-filter-active 10 months ago product-filter-attribute 10 months ago product-filter-checkbox-list 1 month ago product-filter-chips 1 month ago product-filter-clear-button 1 month ago product-filter-price 10 months ago product-filter-price-slider 1 month ago product-filter-rating 10 months ago product-filter-removable-chips 1 month ago product-filter-status 10 months ago product-filter-taxonomy 11 months ago product-filters 3 weeks ago product-gallery 5 months ago product-gallery-large-image 5 months ago product-gallery-large-image-next-previous 10 months ago product-gallery-thumbnails 5 months ago product-image 9 months ago product-image-gallery 1 year ago product-meta 1 year ago product-new 1 year ago product-on-sale 1 year ago product-price 7 months ago product-rating 1 year ago product-rating-counter 1 year ago product-rating-stars 1 year ago product-results-count 7 months ago product-review-author-name 1 year ago product-review-content 1 year ago product-review-date 1 year ago product-review-form 10 months ago product-review-rating 1 year ago product-review-template 7 months ago product-reviews 1 year ago product-reviews-pagination 1 year ago product-reviews-pagination-next 2 months ago product-reviews-pagination-numbers 1 year ago product-reviews-pagination-previous 2 months ago product-reviews-title 1 year ago product-sale-badge 9 months ago product-sku 2 months ago product-specifications 1 year ago product-stock-indicator 9 months ago product-summary 7 months ago product-tag 1 year ago product-template 9 months ago product-title 1 year ago product-top-rated 1 year ago products-by-attribute 1 year ago rating-filter 1 year ago related-products 1 year ago reviews-by-category 1 year ago reviews-by-product 1 year ago saved-for-later 1 month ago single-product 1 month ago stock-filter 1 year ago store-notices 1 year ago wishlist 1 month ago woocommerce 3 weeks ago 219.js 1 month ago 484.js 1 month ago accordion-group.asset.php 1 month ago accordion-group.js 1 month ago accordion-header-style.asset.php 1 year ago accordion-header.asset.php 1 month ago accordion-header.js 1 month ago accordion-item-style.asset.php 2 months ago accordion-item.asset.php 1 month ago accordion-item.js 1 month ago accordion-panel-style.asset.php 1 year ago accordion-panel.asset.php 1 month ago accordion-panel.js 1 month ago active-filters-frontend.asset.php 1 month ago active-filters-frontend.js 1 month ago active-filters-rtl.css 10 months ago active-filters-style.asset.php 1 month ago active-filters-wrapper-frontend.js 1 month ago active-filters.asset.php 1 month ago active-filters.css 10 months ago active-filters.js 1 month ago add-to-cart-form.asset.php 1 month ago add-to-cart-form.js 1 month ago add-to-cart-with-options-grouped-product-item-label-style.asset.php 2 months ago add-to-cart-with-options-grouped-product-item-label.asset.php 1 month ago add-to-cart-with-options-grouped-product-item-label.js 1 month ago add-to-cart-with-options-grouped-product-item-selector-rtl.css 1 month ago add-to-cart-with-options-grouped-product-item-selector-style.asset.php 1 month ago add-to-cart-with-options-grouped-product-item-selector.asset.php 1 month ago add-to-cart-with-options-grouped-product-item-selector.css 1 month ago add-to-cart-with-options-grouped-product-item-selector.js 1 month ago add-to-cart-with-options-grouped-product-item-style.asset.php 1 month ago add-to-cart-with-options-grouped-product-item.asset.php 1 month ago add-to-cart-with-options-grouped-product-item.js 1 month ago add-to-cart-with-options-grouped-product-selector.asset.php 1 month ago add-to-cart-with-options-grouped-product-selector.js 1 month ago add-to-cart-with-options-quantity-selector.asset.php 1 month ago add-to-cart-with-options-quantity-selector.js 1 month ago add-to-cart-with-options-variation-description-style.asset.php 2 months ago add-to-cart-with-options-variation-description.asset.php 1 month ago add-to-cart-with-options-variation-description.js 1 month ago add-to-cart-with-options-variation-selector-attribute-name-style.asset.php 1 month ago add-to-cart-with-options-variation-selector-attribute-name.asset.php 1 month ago add-to-cart-with-options-variation-selector-attribute-name.js 1 month ago add-to-cart-with-options-variation-selector-attribute-rtl.css 1 month ago add-to-cart-with-options-variation-selector-attribute-style.asset.php 3 weeks ago add-to-cart-with-options-variation-selector-attribute.asset.php 3 weeks ago add-to-cart-with-options-variation-selector-attribute.css 1 month ago add-to-cart-with-options-variation-selector-attribute.js 3 weeks ago add-to-cart-with-options-variation-selector.asset.php 1 month ago add-to-cart-with-options-variation-selector.js 1 month ago add-to-cart-with-options.asset.php 2 weeks ago add-to-cart-with-options.js 2 weeks ago add-to-wishlist-button.asset.php 1 month ago add-to-wishlist-button.js 1 month ago all-products-frontend.asset.php 1 month ago all-products-frontend.js 1 month ago all-products-rtl.css 2 months ago all-products-style.asset.php 1 month ago all-products.asset.php 1 month ago all-products.css 2 months ago all-products.js 1 month ago all-reviews-rtl.css 10 months ago all-reviews-style.asset.php 1 month ago all-reviews.asset.php 1 month ago all-reviews.css 10 months ago all-reviews.js 1 month ago attribute-filter-frontend.asset.php 1 month ago attribute-filter-frontend.js 1 month ago attribute-filter-rtl.css 2 months ago attribute-filter-style.asset.php 1 month ago attribute-filter-style.js.LICENSE.txt 2 years ago attribute-filter-wrapper-frontend.js 1 month ago attribute-filter.asset.php 1 month ago attribute-filter.css 2 months ago attribute-filter.js 1 month ago blocks-checkout-events.asset.php 2 months ago blocks-checkout-events.js 2 months ago blocks-checkout.asset.php 1 month ago blocks-checkout.js 1 month ago blocks-components.asset.php 1 month ago blocks-components.js 1 month ago blocks-json.php 3 weeks ago breadcrumbs-rtl.css 10 months ago breadcrumbs-style.asset.php 2 months ago breadcrumbs.asset.php 1 month ago breadcrumbs.css 10 months ago breadcrumbs.js 1 month ago cart-frontend.asset.php 1 month ago cart-frontend.js 1 month ago cart-link-rtl.css 10 months ago cart-link-style.asset.php 1 month ago cart-link.asset.php 1 month ago cart-link.css 10 months ago cart-link.js 1 month ago cart-rtl.css 1 month ago cart-style.asset.php 1 month ago cart.asset.php 1 month ago cart.css 1 month ago cart.js 1 month ago catalog-sorting.asset.php 1 month ago catalog-sorting.js 1 month ago category-description-style.asset.php 1 month ago category-description.asset.php 1 month ago category-description.js 1 month ago category-title-style.asset.php 1 month ago category-title.asset.php 1 month ago category-title.js 1 month ago checkout-frontend.asset.php 1 month ago checkout-frontend.js 1 month ago checkout-rtl.css 1 month ago checkout-style.asset.php 1 month ago checkout.asset.php 1 month ago checkout.css 1 month ago checkout.js 1 month ago classic-shortcode-rtl.css 10 months ago classic-shortcode-style.asset.php 1 month ago classic-shortcode.asset.php 1 month ago classic-shortcode.css 10 months ago classic-shortcode.js 1 month ago coming-soon-rtl.css 10 months ago coming-soon-style.asset.php 1 month ago coming-soon.asset.php 1 month ago coming-soon.css 10 months ago coming-soon.js 1 month ago coupon-code-style.asset.php 2 months ago coupon-code.asset.php 2 months ago coupon-code.js 2 months ago customer-account.asset.php 1 month ago customer-account.js 1 month ago dependency-detection.js 3 months ago dropdown.asset.php 1 month ago dropdown.js 1 month ago email-content-style.asset.php 2 months ago email-content.asset.php 2 months ago email-content.js 2 months ago featured-category-rtl.css 7 months ago featured-category-style.asset.php 1 month ago featured-category.asset.php 1 month ago featured-category.css 7 months ago featured-category.js 1 month ago featured-product-rtl.css 7 months ago featured-product-style.asset.php 1 month ago featured-product.asset.php 1 month ago featured-product.css 7 months ago featured-product.js 1 month ago filter-wrapper-frontend.asset.php 1 month ago filter-wrapper-frontend.js 1 month ago filter-wrapper.asset.php 1 month ago filter-wrapper.js 1 month ago handpicked-products-style.asset.php 1 month ago handpicked-products.asset.php 1 month ago handpicked-products.js 1 month ago interactivity-blocks-frontend-assets.php 3 weeks ago legacy-template-rtl.css 9 months ago legacy-template-style.asset.php 1 month ago legacy-template.asset.php 1 month ago legacy-template.css 9 months ago legacy-template.js 1 month ago mini-cart-component-frontend.asset.php 1 month ago mini-cart-component-frontend.js 1 month ago mini-cart-contents-rtl.css 1 month ago mini-cart-contents-style.asset.php 1 month ago mini-cart-contents.asset.php 1 month ago mini-cart-contents.css 1 month ago mini-cart-contents.js 1 month ago mini-cart-frontend.asset.php 1 month ago mini-cart-frontend.js 1 month ago mini-cart-rtl.css 4 months ago mini-cart-style.asset.php 1 month ago mini-cart.asset.php 1 month ago mini-cart.css 4 months ago mini-cart.js 1 month ago order-confirmation-additional-fields-rtl.css 4 months ago order-confirmation-additional-fields-style.asset.php 2 months ago order-confirmation-additional-fields-wrapper-rtl.css 10 months ago order-confirmation-additional-fields-wrapper-style.asset.php 2 months ago order-confirmation-additional-fields-wrapper.asset.php 1 month ago order-confirmation-additional-fields-wrapper.css 10 months ago order-confirmation-additional-fields-wrapper.js 1 month ago order-confirmation-additional-fields.asset.php 1 month ago order-confirmation-additional-fields.css 4 months ago order-confirmation-additional-fields.js 1 month ago order-confirmation-additional-information-rtl.css 4 months ago order-confirmation-additional-information-style.asset.php 2 months ago order-confirmation-additional-information.asset.php 1 month ago order-confirmation-additional-information.css 4 months ago order-confirmation-additional-information.js 1 month ago order-confirmation-billing-address-rtl.css 4 months ago order-confirmation-billing-address-style.asset.php 2 months ago order-confirmation-billing-address.asset.php 1 month ago order-confirmation-billing-address.css 4 months ago order-confirmation-billing-address.js 1 month ago order-confirmation-billing-wrapper-style.asset.php 2 months ago order-confirmation-billing-wrapper.asset.php 1 month ago order-confirmation-billing-wrapper.js 1 month ago order-confirmation-create-account-frontend.asset.php 1 month ago order-confirmation-create-account-frontend.js 1 month ago order-confirmation-create-account-rtl.css 4 months ago order-confirmation-create-account-style.asset.php 1 month ago order-confirmation-create-account.asset.php 1 month ago order-confirmation-create-account.css 4 months ago order-confirmation-create-account.js 1 month ago order-confirmation-downloads-rtl.css 4 months ago order-confirmation-downloads-style.asset.php 2 months ago order-confirmation-downloads-wrapper-style.asset.php 1 month ago order-confirmation-downloads-wrapper.asset.php 1 month ago order-confirmation-downloads-wrapper.js 1 month ago order-confirmation-downloads.asset.php 1 month ago order-confirmation-downloads.css 4 months ago order-confirmation-downloads.js 1 month ago order-confirmation-shipping-address-rtl.css 4 months ago order-confirmation-shipping-address-style.asset.php 2 months ago order-confirmation-shipping-address.asset.php 1 month ago order-confirmation-shipping-address.css 4 months ago order-confirmation-shipping-address.js 1 month ago order-confirmation-shipping-wrapper-style.asset.php 2 months ago order-confirmation-shipping-wrapper.asset.php 1 month ago order-confirmation-shipping-wrapper.js 1 month ago order-confirmation-status-rtl.css 10 months ago order-confirmation-status-style.asset.php 2 months ago order-confirmation-status.asset.php 1 month ago order-confirmation-status.css 10 months ago order-confirmation-status.js 1 month ago order-confirmation-summary-rtl.css 10 months ago order-confirmation-summary-style.asset.php 2 months ago order-confirmation-summary.asset.php 1 month ago order-confirmation-summary.css 10 months ago order-confirmation-summary.js 1 month ago order-confirmation-totals-rtl.css 4 months ago order-confirmation-totals-style.asset.php 2 months ago order-confirmation-totals-wrapper-style.asset.php 2 months ago order-confirmation-totals-wrapper.asset.php 1 month ago order-confirmation-totals-wrapper.js 1 month ago order-confirmation-totals.asset.php 1 month ago order-confirmation-totals.css 4 months ago order-confirmation-totals.js 1 month ago packages-style-rtl.css 3 months ago packages-style-style.asset.php 1 month ago packages-style-style.js.LICENSE.txt 9 months ago packages-style.css 3 months ago page-content-wrapper-style.asset.php 1 month ago page-content-wrapper.asset.php 1 month ago page-content-wrapper.js 1 month ago payment-method-icons-rtl.css 10 months ago payment-method-icons-style.asset.php 2 months ago payment-method-icons.asset.php 2 months ago payment-method-icons.css 10 months ago payment-method-icons.js 2 months ago price-filter-frontend.asset.php 1 month ago price-filter-frontend.js 1 month ago price-filter-rtl.css 10 months ago price-filter-style.asset.php 1 month ago price-filter-wrapper-frontend.js 1 month ago price-filter.asset.php 3 weeks ago price-filter.css 10 months ago price-filter.js 3 weeks ago price-format.asset.php 7 months ago price-format.js 7 months ago product-average-rating-frontend.js 1 month ago product-average-rating.js 1 month ago product-best-sellers-style.asset.php 1 month ago product-best-sellers.asset.php 1 month ago product-best-sellers.js 1 month ago product-button-frontend.js 1 month ago product-button-rtl.css 7 months ago product-button.css 7 months ago product-button.js 1 month ago product-categories-rtl.css 10 months ago product-categories-style.asset.php 1 month ago product-categories.asset.php 1 month ago product-categories.css 10 months ago product-categories.js 1 month ago product-category-style.asset.php 1 month ago product-category.asset.php 1 month ago product-category.js 1 month ago product-collection-no-results-style.asset.php 2 months ago product-collection-no-results.asset.php 1 month ago product-collection-no-results.js 1 month ago product-collection.asset.php 3 weeks ago product-collection.js 3 weeks ago product-description-style.asset.php 2 months ago product-description.asset.php 2 months ago product-description.js 2 months ago product-details-rtl.css 10 months ago product-details-style.asset.php 1 month ago product-details.asset.php 1 month ago product-details.css 10 months ago product-details.js 1 month ago product-filter-active.asset.php 1 month ago product-filter-active.js 1 month ago product-filter-attribute-rtl.css 10 months ago product-filter-attribute-style.asset.php 1 month ago product-filter-attribute.asset.php 1 month ago product-filter-attribute.css 10 months ago product-filter-attribute.js 1 month ago product-filter-checkbox-list.asset.php 1 month ago product-filter-checkbox-list.js 1 month ago product-filter-chips.asset.php 1 month ago product-filter-chips.js 1 month ago product-filter-clear-button-rtl.css 10 months ago product-filter-clear-button-style.asset.php 1 month ago product-filter-clear-button.asset.php 1 month ago product-filter-clear-button.css 10 months ago product-filter-clear-button.js 1 month ago product-filter-price-slider.asset.php 1 month ago product-filter-price-slider.js 1 month ago product-filter-price.asset.php 1 month ago product-filter-price.js 1 month ago product-filter-rating-rtl.css 10 months ago product-filter-rating-style.asset.php 1 month ago product-filter-rating.asset.php 1 month ago product-filter-rating.css 10 months ago product-filter-rating.js 1 month ago product-filter-removable-chips-style.asset.php 1 month ago product-filter-removable-chips.asset.php 1 month ago product-filter-removable-chips.js 1 month ago product-filter-status-rtl.css 10 months ago product-filter-status-style.asset.php 1 month ago product-filter-status.asset.php 1 month ago product-filter-status.css 10 months ago product-filter-status.js 1 month ago product-filter-taxonomy-rtl.css 10 months ago product-filter-taxonomy-style.asset.php 1 month ago product-filter-taxonomy.asset.php 1 month ago product-filter-taxonomy.css 10 months ago product-filter-taxonomy.js 1 month ago product-filters.asset.php 3 weeks ago product-filters.js 3 weeks ago product-gallery-large-image-next-previous-style.asset.php 10 months ago product-gallery-large-image-next-previous.asset.php 1 month ago product-gallery-large-image-next-previous.js 1 month ago product-gallery-large-image.asset.php 5 months ago product-gallery-large-image.js 5 months ago product-gallery-thumbnails-style.asset.php 2 months ago product-gallery-thumbnails.asset.php 1 month ago product-gallery-thumbnails.js 1 month ago product-gallery.asset.php 2 months ago product-gallery.js 2 months ago product-image-frontend.js 1 month ago product-image-gallery-rtl.css 10 months ago product-image-gallery-style.asset.php 1 month ago product-image-gallery.css 10 months ago product-image-rtl.css 10 months ago product-image.css 10 months ago product-image.js 1 month ago product-new-style.asset.php 1 month ago product-new.asset.php 1 month ago product-new.js 1 month ago product-on-sale-style.asset.php 1 month ago product-on-sale.asset.php 1 month ago product-on-sale.js 1 month ago product-price-frontend.js 1 month ago product-price-rtl.css 3 months ago product-price.css 3 months ago product-price.js 1 month ago product-query-rtl.css 10 months ago product-query-style.asset.php 1 month ago product-query.asset.php 1 month ago product-query.css 10 months ago product-query.js 1 month ago product-rating-counter-frontend.js 1 month ago product-rating-counter.js 1 month ago product-rating-frontend.js 1 month ago product-rating-rtl.css 10 months ago product-rating-stars-frontend.js 1 month ago product-rating-stars-rtl.css 10 months ago product-rating-stars.css 10 months ago product-rating-stars.js 1 month ago product-rating.css 10 months ago product-rating.js 1 month ago product-results-count-rtl.css 10 months ago product-results-count-style.asset.php 2 months ago product-results-count.asset.php 1 month ago product-results-count.css 10 months ago product-results-count.js 1 month ago product-review-author-name-rtl.css 10 months ago product-review-author-name-style.asset.php 2 months ago product-review-author-name.asset.php 1 month ago product-review-author-name.css 10 months ago product-review-author-name.js 1 month ago product-review-content-rtl.css 10 months ago product-review-content-style.asset.php 2 months ago product-review-content.asset.php 1 month ago product-review-content.css 10 months ago product-review-content.js 1 month ago product-review-date-rtl.css 10 months ago product-review-date-style.asset.php 2 months ago product-review-date.asset.php 1 month ago product-review-date.css 10 months ago product-review-date.js 1 month ago product-review-form.asset.php 1 month ago product-review-form.js 1 month ago product-review-rating-style.asset.php 2 months ago product-review-rating.asset.php 1 month ago product-review-rating.js 1 month ago product-review-template-rtl.css 10 months ago product-review-template-style.asset.php 2 months ago product-review-template.asset.php 1 month ago product-review-template.css 10 months ago product-review-template.js 1 month ago product-reviews-pagination-next-style.asset.php 2 months ago product-reviews-pagination-next.asset.php 1 month ago product-reviews-pagination-next.js 1 month ago product-reviews-pagination-numbers-style.asset.php 1 month ago product-reviews-pagination-numbers.asset.php 1 month ago product-reviews-pagination-numbers.js 1 month ago product-reviews-pagination-previous-style.asset.php 2 months ago product-reviews-pagination-previous.asset.php 1 month ago product-reviews-pagination-previous.js 1 month ago product-reviews-pagination-rtl.css 10 months ago product-reviews-pagination-style.asset.php 1 month ago product-reviews-pagination.asset.php 1 month ago product-reviews-pagination.css 10 months ago product-reviews-pagination.js 1 month ago product-reviews-title-rtl.css 10 months ago product-reviews-title-style.asset.php 2 months ago product-reviews-title.asset.php 1 month ago product-reviews-title.css 10 months ago product-reviews-title.js 1 month ago product-reviews.asset.php 2 months ago product-reviews.js 2 months ago product-sale-badge-frontend.js 1 month ago product-sale-badge-rtl.css 10 months ago product-sale-badge.css 10 months ago product-sale-badge.js 1 month ago product-search-rtl.css 10 months ago product-search-style.asset.php 1 month ago product-search.asset.php 1 month ago product-search.css 10 months ago product-search.js 1 month ago product-sku-frontend.js 1 month ago product-sku-rtl.css 2 months ago product-sku.css 2 months ago product-sku.js 1 month ago product-specifications-rtl.css 10 months ago product-specifications-style.asset.php 2 months ago product-specifications.asset.php 2 months ago product-specifications.css 10 months ago product-specifications.js 2 months ago product-stock-indicator-frontend.js 1 month ago product-stock-indicator-rtl.css 10 months ago product-stock-indicator.css 10 months ago product-stock-indicator.js 1 month ago product-summary-frontend.js 1 month ago product-summary-rtl.css 10 months ago product-summary.css 10 months ago product-summary.js 1 month ago product-tag-style.asset.php 1 month ago product-tag.asset.php 3 weeks ago product-tag.js 3 weeks ago product-template-style.asset.php 2 months ago product-template.asset.php 1 month ago product-template.js 1 month ago product-title-frontend.js 1 month ago product-title-rtl.css 10 months ago product-title.css 10 months ago product-title.js 1 month ago product-top-rated-style.asset.php 1 month ago product-top-rated.asset.php 1 month ago product-top-rated.js 1 month ago products-by-attribute-style.asset.php 1 month ago products-by-attribute.asset.php 1 month ago products-by-attribute.js 1 month ago rating-filter-frontend.asset.php 1 month ago rating-filter-frontend.js 1 month ago rating-filter-rtl.css 2 months ago rating-filter-style.asset.php 1 month ago rating-filter-style.js.LICENSE.txt 2 years ago rating-filter-wrapper-frontend.js 1 month ago rating-filter.asset.php 1 month ago rating-filter.css 2 months ago rating-filter.js 1 month ago reviews-by-category-rtl.css 10 months ago reviews-by-category-style.asset.php 1 month ago reviews-by-category.asset.php 1 month ago reviews-by-category.css 10 months ago reviews-by-category.js 1 month ago reviews-by-product-rtl.css 10 months ago reviews-by-product-style.asset.php 1 month ago reviews-by-product.asset.php 1 month ago reviews-by-product.css 10 months ago reviews-by-product.js 1 month ago reviews-frontend.asset.php 1 month ago reviews-frontend.js 1 month ago saved-for-later.asset.php 1 month ago saved-for-later.js 1 month ago single-product-rtl.css 10 months ago single-product-style.asset.php 1 month ago single-product.asset.php 1 month ago single-product.css 10 months ago single-product.js 1 month ago stock-filter-frontend.asset.php 1 month ago stock-filter-frontend.js 1 month ago stock-filter-rtl.css 2 months ago stock-filter-style.asset.php 1 month ago stock-filter-style.js.LICENSE.txt 2 years ago stock-filter-wrapper-frontend.js 1 month ago stock-filter.asset.php 1 month ago stock-filter.css 2 months ago stock-filter.js 1 month ago store-notices-rtl.css 2 months ago store-notices-style.asset.php 1 month ago store-notices.asset.php 1 month ago store-notices.css 2 months ago store-notices.js 1 month ago wc-blocks-data.asset.php 1 month ago wc-blocks-data.js 1 month ago wc-blocks-editor-style-rtl.css 3 months ago wc-blocks-editor-style.css 3 months ago wc-blocks-frontend-vendors-frontend.asset.php 2 months ago wc-blocks-frontend-vendors-frontend.js 2 months ago wc-blocks-google-analytics.asset.php 2 months ago wc-blocks-google-analytics.js 2 months ago wc-blocks-middleware.asset.php 2 months ago wc-blocks-middleware.js 2 months ago wc-blocks-registry.asset.php 2 months ago wc-blocks-registry.js 2 months ago wc-blocks-rtl.css 9 months ago wc-blocks-shared-context.asset.php 7 months ago wc-blocks-shared-context.js 7 months ago wc-blocks-shared-hocs.asset.php 2 months ago wc-blocks-shared-hocs.js 2 months ago wc-blocks-style.asset.php 1 month ago wc-blocks-vendors.asset.php 2 weeks ago wc-blocks-vendors.js 2 weeks ago wc-blocks.asset.php 2 months ago wc-blocks.css 9 months ago wc-blocks.js 2 months ago wc-cart-checkout-base-frontend.asset.php 1 month ago wc-cart-checkout-base-frontend.js 1 month ago wc-cart-checkout-vendors-frontend.asset.php 1 month ago wc-cart-checkout-vendors-frontend.js 1 month ago wc-entities.asset.php 1 month ago wc-entities.js 1 month ago wc-payment-method-bacs.asset.php 3 months ago wc-payment-method-bacs.js 3 months ago wc-payment-method-cheque.asset.php 3 months ago wc-payment-method-cheque.js 3 months ago wc-payment-method-cod.asset.php 2 months ago wc-payment-method-cod.js 2 months ago wc-payment-method-paypal.asset.php 1 month ago wc-payment-method-paypal.js 1 month ago wc-schema-parser.asset.php 2 months ago wc-schema-parser.js 2 months ago wc-settings.asset.php 2 months ago wc-settings.js 2 months ago wc-shipping-method-pickup-location.asset.php 1 month ago wc-shipping-method-pickup-location.js 1 month ago wc-types.asset.php 1 month ago wc-types.js 1 month ago wishlist.asset.php 1 month ago wishlist.js 1 month ago
coupon-code.js
1 lines
1 (()=>{"use strict";var e={n:t=>{var o=t&&t.__esModule?()=>t.default:()=>t;return e.d(o,{a:o}),o},d:(t,o)=>{for(var n in o)e.o(o,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:o[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const t=window.wp.blocks,o=window.wp.i18n,n=window.wp.blockEditor,r=window.wp.components,i=window.wp.element,c=window.wp.apiFetch;var a=e.n(c);const s=window.wp.hooks,u=window.wp.data,l=window.wc.wcSettings,m=window.ReactJSXRuntime,d={percent:(0,o.__)("Percentage discount","woocommerce"),fixed_cart:(0,o.__)("Fixed cart discount","woocommerce"),fixed_product:(0,o.__)("Fixed product discount","woocommerce")};function p(e){return"percent"===e?100:1e6}function _({attributes:e,setAttributes:t}){const n=function(){const e=(0,l.getSetting)("couponTypes",d);return Object.entries(e).map(([e,t])=>({value:e,label:t}))}(),i=p(e.discountType);return(0,m.jsxs)(r.PanelBody,{title:(0,o.__)("General","woocommerce"),initialOpen:!0,children:[(0,m.jsx)(r.SelectControl,{label:(0,o.__)("Discount type","woocommerce"),value:e.discountType,options:n,onChange:o=>{const n=p(o);t({discountType:o,amount:Math.min(e.amount,n)})},__nextHasNoMarginBottom:!0}),(0,m.jsx)(r.TextControl,{label:(0,o.__)("Amount","woocommerce"),value:String(e.amount),type:"number",min:0,max:i,onChange:e=>t({amount:Math.min(Number(e)||0,i)}),__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,m.jsx)(r.TextControl,{label:(0,o.__)("Expires (days after send)","woocommerce"),help:(0,o.__)("Set to 0 for no expiry.","woocommerce"),value:String(e.expiryDay),type:"number",min:0,onChange:e=>t({expiryDay:Number(e)||0}),__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,m.jsx)(r.ToggleControl,{label:(0,o.__)("Free shipping","woocommerce"),checked:e.freeShipping,onChange:e=>t({freeShipping:e}),__nextHasNoMarginBottom:!0})]})}function g({attributes:e,setAttributes:t}){return(0,m.jsxs)(r.PanelBody,{title:(0,o.__)("Usage limits","woocommerce"),initialOpen:!1,children:[(0,m.jsx)(r.TextControl,{label:(0,o.__)("Usage limit per coupon","woocommerce"),help:(0,o.__)("How many times this coupon can be used before it is void. Set to 0 for unlimited.","woocommerce"),value:String(e.usageLimit),type:"number",min:0,onChange:e=>t({usageLimit:Number(e)||0}),__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,m.jsx)(r.TextControl,{label:(0,o.__)("Usage limit per user","woocommerce"),help:(0,o.__)("How many times this coupon can be used by an individual user. Set to 0 for unlimited.","woocommerce"),value:String(e.usageLimitPerUser),type:"number",min:0,onChange:e=>t({usageLimitPerUser:Number(e)||0}),__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})]})}function x({label:e,value:t,onChange:o,endpoint:n}){const[c,s]=(0,i.useState)([]),[u,l]=(0,i.useState)([]),d=(0,i.useRef)(null),p=(0,i.useRef)(null),_=(0,i.useCallback)(e=>{if(p.current&&p.current.abort(),e.length<2)return s([]),void l([]);p.current=new AbortController,a()({path:`/wc/v3/${n}?search=${encodeURIComponent(e)}&per_page=20`,signal:p.current.signal}).then(e=>{l(e),s(e.map(e=>e.name))}).catch(e=>{e instanceof Error&&"AbortError"===e.name||(s([]),l([]))})},[n]);(0,i.useEffect)(()=>()=>{d.current&&clearTimeout(d.current),p.current&&p.current.abort()},[]);const g=t.map(e=>e.title);return(0,m.jsx)("div",{style:{marginBottom:"24px"},children:(0,m.jsx)(r.FormTokenField,{label:e,value:g,suggestions:c,onInputChange:e=>{d.current&&clearTimeout(d.current),d.current=setTimeout(()=>{_(e)},300)},onChange:e=>{const n=e.map(e=>{const o=t.find(t=>t.title===e);if(o)return o;const n=u.find(t=>t.name===e);return n?{id:n.id,title:n.name}:null}).filter(e=>null!==e);o(n)},__experimentalExpandOnFocus:!0,__next40pxDefaultSize:!0})})}function h({attributes:e,setAttributes:t}){return(0,m.jsxs)(r.PanelBody,{title:(0,o.__)("Usage restrictions","woocommerce"),initialOpen:!1,children:[(0,m.jsx)(r.TextControl,{label:(0,o.__)("Minimum spend","woocommerce"),value:e.minimumAmount,onChange:e=>t({minimumAmount:e}),type:"number",min:0,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,m.jsx)(r.TextControl,{label:(0,o.__)("Maximum spend","woocommerce"),value:e.maximumAmount,onChange:e=>t({maximumAmount:e}),type:"number",min:0,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,m.jsx)(r.ToggleControl,{label:(0,o.__)("Individual use only","woocommerce"),help:(0,o.__)("If checked, this coupon cannot be used in conjunction with other coupons.","woocommerce"),checked:e.individualUse,onChange:e=>t({individualUse:e}),__nextHasNoMarginBottom:!0}),(0,m.jsx)(r.ToggleControl,{label:(0,o.__)("Exclude sale items","woocommerce"),help:(0,o.__)("If checked, this coupon will not apply to items on sale.","woocommerce"),checked:e.excludeSaleItems,onChange:e=>t({excludeSaleItems:e}),__nextHasNoMarginBottom:!0}),(0,m.jsx)(x,{label:(0,o.__)("Products","woocommerce"),value:e.productIds,onChange:e=>t({productIds:e}),endpoint:"products"}),(0,m.jsx)(x,{label:(0,o.__)("Excluded products","woocommerce"),value:e.excludedProductIds,onChange:e=>t({excludedProductIds:e}),endpoint:"products"}),(0,m.jsx)(x,{label:(0,o.__)("Product categories","woocommerce"),value:e.productCategoryIds,onChange:e=>t({productCategoryIds:e}),endpoint:"products/categories"}),(0,m.jsx)(x,{label:(0,o.__)("Excluded product categories","woocommerce"),value:e.excludedProductCategoryIds,onChange:e=>t({excludedProductCategoryIds:e}),endpoint:"products/categories"}),(0,m.jsx)(r.TextControl,{label:(0,o.__)("Allowed emails","woocommerce"),help:(0,o.__)("Comma-separated list of allowed emails to check against the customer's billing email.","woocommerce"),value:e.emailRestrictions,onChange:e=>t({emailRestrictions:e}),__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})]})}const b=["draft","future","pending","private","publish"];function w({attributes:e,setAttributes:t}){const n=e.couponCode,[c,l]=(0,i.useState)(""),[d,p]=(0,i.useState)([]),[_,g]=(0,i.useState)(!1),x=(0,i.useRef)(null),h=(0,i.useRef)(null),w=(0,i.useCallback)(e=>{if(h.current&&h.current.abort(),e.length<2)return p([]),void g(!1);g(!0),h.current=new AbortController;const t=new URLSearchParams({per_page:"20",search:e});b.forEach(e=>{t.append("status[]",e)}),a()({path:`/wc/v3/coupons?${t.toString()}`,signal:h.current.signal}).then(e=>{p(e),g(!1)}).catch(e=>{e instanceof Error&&"AbortError"===e.name||("rest_forbidden"!==e.code&&403!==e.status||(0,u.dispatch)("core/notices").createErrorNotice((0,o.__)("You do not have permission to view coupons.","woocommerce"),{id:"coupon-code-permission-error",type:"snackbar"}),g(!1))})},[]);(0,i.useEffect)(()=>(x.current&&clearTimeout(x.current),x.current=setTimeout(()=>{w(c)},300),()=>{x.current&&clearTimeout(x.current)}),[c,w]),(0,i.useEffect)(()=>()=>{h.current&&h.current.abort()},[]);const f=d.map(e=>({value:e.code,label:e.code}));return n&&!f.some(e=>e.value===n)&&f.unshift({value:n,label:n}),(0,m.jsxs)(r.PanelBody,{title:(0,o.__)("Coupon","woocommerce"),initialOpen:!0,children:[(0,m.jsxs)("div",{style:{marginBottom:"16px"},children:[(0,m.jsx)("div",{children:(0,o.__)("Search for an existing coupon","woocommerce")}),(0,m.jsx)(r.ComboboxControl,{label:(0,o.__)("Search coupons","woocommerce"),hideLabelFromVision:!0,value:n,onChange:e=>{t({couponCode:e||""})},onFilterValueChange:e=>{l(e)},options:f,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,help:_?(0,o.__)("Searching coupons…","woocommerce"):c.length>0&&c.length<2?(0,o.__)("Type at least 2 characters to search","woocommerce"):null}),_&&(0,m.jsx)("div",{style:{display:"flex",alignItems:"center",marginTop:"8px"},children:(0,m.jsx)(r.Spinner,{})})]}),(0,m.jsx)("div",{children:(0,m.jsx)(r.Button,{variant:"link",onClick:()=>{const e=(0,s.applyFilters)("woocommerce_email_editor_create_coupon_handler",()=>{window.open("/wp-admin/post-new.php?post_type=shop_coupon","_blank")});"function"==typeof e&&e()},style:{padding:0,height:"auto"},children:(0,o.__)("Create new coupon","woocommerce")})})]})}const f=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"woocommerce/coupon-code","version":"1.0.0","title":"Coupon Code","category":"woocommerce","description":"Include a coupon code to entice customers to make a purchase.","supports":{"email":true,"html":false,"align":true,"color":{"text":true,"background":true},"typography":{"fontSize":true},"spacing":{"margin":true,"padding":true},"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true}},"attributes":{"couponCode":{"type":"string","default":""},"source":{"type":"string","default":"createNew","enum":["createNew","existing"]},"discountType":{"type":"string","default":"percent"},"amount":{"type":"number","default":10},"expiryDay":{"type":"number","default":10},"freeShipping":{"type":"boolean","default":false},"usageLimit":{"type":"number","default":0},"usageLimitPerUser":{"type":"number","default":0},"minimumAmount":{"type":"string","default":""},"maximumAmount":{"type":"string","default":""},"individualUse":{"type":"boolean","default":false},"excludeSaleItems":{"type":"boolean","default":false},"productIds":{"type":"array","default":[],"items":{"type":"object"}},"excludedProductIds":{"type":"array","default":[],"items":{"type":"object"}},"productCategoryIds":{"type":"array","default":[],"items":{"type":"object"}},"excludedProductCategoryIds":{"type":"array","default":[],"items":{"type":"object"}},"emailRestrictions":{"type":"string","default":""}},"textdomain":"woocommerce"}');(0,t.registerBlockType)(f,{edit:function(e){const{attributes:t,setAttributes:i}=e,c=t.source??"createNew",a=t.couponCode,{className:s="",style:u,...l}=(0,n.useBlockProps)(),d="createNew"===c?"XXXX-XXXXXX-XXXX":a||"",{background:p,backgroundColor:x,border:b,...f}=u||{},y={fontSize:"1.2em",padding:"12px 20px",borderWidth:"2px",borderStyle:"dashed",borderColor:"#cccccc",borderRadius:"4px",color:"#000000",backgroundColor:"#f5f5f5",fontWeight:"bold",letterSpacing:"1px",...f,display:"inline-block",boxSizing:"border-box",textAlign:"center"},C=t.align,j={textAlign:["left","center","right","justify","start","end"].includes(C)?C:"center"},v=s.split(" ").filter(Boolean),S=[],N=[];v.forEach(e=>{e.startsWith("has-")||e.startsWith("wp-elements-")?S.push(e):N.push(e)});const k=N.length>0?N.join(" "):void 0,X=S.length>0?S.join(" "):void 0;return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsxs)(n.InspectorControls,{children:[(0,m.jsx)(r.PanelBody,{title:(0,o.__)("Coupon source","woocommerce"),initialOpen:!0,children:(0,m.jsx)(r.SelectControl,{label:(0,o.__)("Coupon source","woocommerce"),hideLabelFromVision:!0,value:c,options:[{value:"createNew",label:(0,o.__)("Create new","woocommerce")},{value:"existing",label:(0,o.__)("Use existing","woocommerce")}],onChange:e=>{i({source:"existing"===e?"existing":"createNew"})},__nextHasNoMarginBottom:!0})}),"createNew"===c&&(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(_,{attributes:t,setAttributes:i}),(0,m.jsx)(g,{attributes:t,setAttributes:i}),(0,m.jsx)(h,{attributes:t,setAttributes:i})]}),"existing"===c&&(0,m.jsx)(w,{attributes:t,setAttributes:i})]}),(0,m.jsxs)("div",{...l,className:k,style:{...l.style,...j},children:[(0,m.jsx)("span",{className:X,style:y,children:d||(0,o.__)("Coupon Code block – No coupon selected","woocommerce")}),"createNew"===c&&(0,m.jsx)("div",{style:{fontSize:"12px",color:"#757575",marginTop:"8px"},children:(0,o.__)("A coupon code will be automatically generated at send time.","woocommerce")})]})]})},save:function(e){const{attributes:t}=e,o=t.source??"createNew",r=t.couponCode,i="createNew"===o?"XXXX-XXXXXX-XXXX":r,c=n.useBlockProps.save();return(0,m.jsx)("div",{...c,children:i&&(0,m.jsx)("strong",{children:i})})},deprecated:[{attributes:{couponCode:{type:"string",default:""}},save:function(e){const{attributes:t}=e,o="string"==typeof t.couponCode?t.couponCode:"",r=n.useBlockProps.save();return(0,m.jsx)("div",{...r,children:o&&(0,m.jsx)("strong",{children:o})})},migrate:e=>({...e,source:"existing"})}]}),((this.wc=this.wc||{}).blocks=this.wc.blocks||{})["coupon-code"]={}})();