Problem:
Change the product ID when user submits the CRED form with CRED commerce settings.
Solution:
There isn't such a built-in feature within CRED commerce plugin, but you can try with some PHP codes, for example, when user submit the CRED form for creating the post, use action filter hook "cred_commerce_add_product_to_cart" to trigger your custom PHP function, in this function, change the product ID when specific condition is satisfied.
Relevant Documentation:
Filter that allows to dynamically alter the product associated with a CRED Commerce form, when adding to cart.
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
- | 9:00 – 13:00 | 9:00 – 13:00 | 9:00 – 13:00 | 9:00 – 13:00 | 9:00 – 13:00 | - |
- | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | - |
Supporter timezone: Asia/Hong_Kong (GMT+08:00)
This topic contains 3 replies, has 2 voices.
Last updated by 6 years, 7 months ago.
Assisted by: Luo Yang.