add_filter('cred_commerce_add_product_to_cart','func_set_product_id_on_fly',10,3);
function func_set_product_id_on_fly($product_id, $form_id, $post_id) {
if ($form_id==99999) {
$product_id=11111;
}
return $product_id; // this is important, to return it
}
Where:
- Replace 99999 with your original form ID
- Replace 11111 with the product ID you want to see in the cart
In order to minimize the cause of the issue and to ensure there is no conflict between the third-party plugin/theme you are using:
Could you please try to resolve your issue by deactivating all third-party plugins as well as the default theme to check for any possible conflicts with any of the plugins or themes?
- Do you see any difference?
If no, then I will require admin access details in order to check whats going wrong with your setup.
*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.
I have set the next reply to private which means only you and I have access to it.
The topic ‘[Closed] Toolset Forms Commerce is not automatically adding the product to the cart.’ is closed to new replies.