Dokan subscription add-ons: product count problem

This topic contains 1 reply and 2 voices, and was last updated by Sekander Badsha 10 years, 1 month ago
Viewing 1 Posts - 1 through 1 (of 1 total)
Author Posts
October 9, 2014 at 4:26 pm 28115
Sekander Badsha Hi, a couple of questions about subscriptions add-ons: 1) [BUG] from frontend admin, dashboard --> products --> ADD NEW PRODUCT if an error occurs (example category not selected) the product is not saved (correct) but the counter of the subscription available products decreases. I guess the issue is in function handle_all_submit (dokan/classes/template-shortcodes.php), the filter "dokan_can_add_product" decreases the product counter before the post is correctly saved. 2) [QUESTION] I know that product count not increased when a product is deleted, is it a commercial strategy or a technical problem?? I would like to change this behavior and I've added to my child theme functions.php, could you tell me please if it make sense ? (dokan_after_delete_product_item calls update_meta_for_delete_product) : (NOTE: updated template-shortcodes.php as from your tip http://goo.gl/1pZt6c) $shortCodes = Dokan_Template_Shortcodes::init(); remove_action( 'template_redirect', array( $shortCodes, 'handle_delete_product' ) ); add_action( 'template_redirect', 'dokan_delete_product_handler_customized' ); function dokan_delete_product_handler_customized() { .... (pasted function dokan_delete_product_handler) .... .... do_action( 'dokan_after_delete_product_item' ); wp_delete_post() .... }
October 15, 2014 at 5:18 pm 28442
Sekander Badsha Sekander Badsha

Hello Manuel,
1) This is not a bug. If a seller does not have any subscription left, the system would not allow the seller to create new products. As we count new product creations, we can not decide upon published products.

2) Yes. That is a commercial policy. Because a seller might create and delete products over and over again and in that way you will loose revenue. So we made it to work that way.

If you want to change that, you can use the action delete_post

Thank you 🙂

Viewing 1 Posts - 1 through 1 (of 1 total)