Home Forums Theme Support Dokan Dokan subscription add-ons: product count problem

This topic is: not resolved

This topic contains 1 reply, has 2 voices, and was last updated by  Sekander Badsha 4 years, 7 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #28115

    Post count: 6


    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' );


    Sekander Badsha
    Post count: 2067

    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 2 posts - 1 through 2 (of 2 total)

The topic ‘Dokan subscription add-ons: product count problem’ is closed to new replies.