Hook into add_to_cart hook
add_action('woocommerce_add_to_cart', 'create_files_for_cart');
function create_files_for_cart() {
// Your code that created the file using the dated the user selected
// More code to add the file created to cart
}
The code to create the downloadable file product is similar to the code in this answer
Add the product to cart with the Cart class functions
You use this plugin to add the date fields to the product.
Related Posts:
- WooCommerce Variable Product Price not showing on single product page
- Woocommerce add extra field to variation product
- single-product.php template not working for single products [closed]
- Optimizing Woocommerce order items query
- How to execute a javascript function just before saving a woocommerce post or a post?
- Change Meta Title seperator and remove on homepage
- WooCommerce Description and Short Description tags removal
- Woocommerce 2.5.5 get billing email from order instance
- Woocommerce products are not displayed on front-end . No products were found matching your selection [closed]
- Custom Text on Product Page based on Shipping Class [closed]
- Set a specific default stock quantity on all WooCommerce new products
- Shipping Location based on IP (Geolocation)
- How to set a minimum length for username in Woocommerce? [closed]
- How to search Woo Commerce products with punctuation in title?
- woocommerce “publish “”product”” webhook
- Creating woocommerce product using WordPress REST API
- Image is not displayed in overridden woocommerce email
- remove categories from product
- WooCommerce Display Digital Download Files Type and Size
- woo commerce get all orders item given category
- Add Stripe Connect data to wc_stripe_payment_request
- WooCommerce get default shipping rate & conditions
- Using WooCommerce for payments only?
- Programatically Remove Item from Cart Not Working – Needs Page Refresh
- Woo commerce+ Stripe – How to associate one account per currency [closed]
- WooCommerce – Stock in Decimals, Using Quantity Intervals with Unique Prices [closed]
- Set default value field meta_Value [closed]
- Adding product info for printing to custom Woocommerce Product Display tab [closed]
- WooCommerce Cart Link based on Cookie Values
- Woocommerce is_shop not on page slug? [closed]
- WooCommerce – Trigger Checkout Form Validation
- Debugging why featured images have stopped showing in WooCommerce on the homepage [closed]
- WooCommerce minimum order amount for specific country excluding local pickup [closed]
- Add shipping address to Woocommerce order emails [closed]
- woocommerce list product by id
- Woocommerce Login Redirect to old domain
- add sub subpage endpoint to woocommerce plugin my-account section
- Show Content On below single product with specific category
- How to change a WooCommerce Subscription Deposit and Monthly Payment? [closed]
- how to change the “return to shop” button text? [closed]
- how to scrolling image on single product page
- How to display WooCommerce product tag names on home and category pages
- Specifically Link To the “Leave a review” part of product page? [closed]
- Problem while adding the variable product woocommerce
- Woocommerce pre_get_posts query variation meta data not working
- Can’t hide product attributes with css on WooCommerce Product Page
- Updating product image
- Split in 2 columns add to cart button and variable forms
- Images not uploading on product page of woocommercr
- How to access WC()->cart in CF7 hook wpcf7_special_mail_tags
- How to integrate e-transfers with checkout in WooCommerce
- Woocomerce Edit source code of form in wordpress
- Single Product Page as a Popup
- Woocommerce to get restaurant table numbers in the checkout fields from the url
- Send all emails to Shop Manager along with admin
- UX Builder not loading for product description edits
- I need help with storefront theme shop page
- Jump to Footer On Scroll – Woocommerce Pages Phones Only
- WordPress Development Workflow
- Woocommerce redirection product_name -> product_cat/product_name
- Woocommerce shop page not showing all products
- Wrong Billing Information in WC_Checkout->get_checkout_fields(‘billing’)?
- How to display two different custom taxonomy terms on a WooCommerce single product page
- Registration roles
- why my price is not showing while adding new product?
- How to send Woocommerce Customer Details (Name, Email and Phone Number) to Admin upon signup
- Sending billing details via POST request to an API
- how can my customers view their purchased products history like an invoice in a specific page on WordPress
- How do I make my products on the homepage responsive?
- Remove username and account password field from checkout page
- How to send an invoice with details to the customers
- Tax exclusive if coupon applied else tax inclusive in items
- WooCommerce Registration, Sync User, Billing and Shipping info
- How to change “add to basket” button text in WooCommerce based on product category?
- Select all product woocommerce
- Woocommerce REST API: creating variations
- How to customize product at cart page
- WooCommerce Storefront site-header padding
- How to check which shortcode is using my template?
- woocommerce: when adding or removing items to cart , it takes cart a few seconds to read changes?
- How to get woocommerce integration instance?
- Create woocommerce order on new user registration
- How Do I Access Parameters Emitted by an Action?
- Same WooComerce shop for different WP sites?
- WooCommerce set specific currency on site shop
- WooCommerce shop, my account, cart every page redirect to home page [closed]
- How to edit woocommerce checkout fields
- Restrict the shop_manager role to the WooCommerce Orders Page
- How to disable click thumbnail product on archives product [closed]
- Woocommerce 404 after chang default language
- When creating a new order (on the dashboard) how can I get the ID of the selected customer
- Setup WooCommerce to properly handle inventory with variable product?
- how to add a page to a plugin?
- Unable to get product category
- Why does have_comments return false but get_comments return array of commemts?
- WooCommerce: I Need to hide my page title/header (including menu) from all the WooCommerce related product pages, such as category and keyword pages
- How can i hide a specific class when cart subtotal is above a certain amount
- Update WooCommerce Short Description using SQL
- How do I fix this “Uncaught ReferenceError: woodmartThemeModule is not defined”?
- How can I solve WordPress error “Cannot load product_attributes” and “Cannot load product-reviews”?