• Resolved mahfelwp

    (@mahfelwp)


    Hi, thanks for great plugin.
    I added new field to edit product and new product page in dokan dashboard and I want to show error when the new fields are empty for this reason I extends class from Dokan_Template_Products for override handle_all_submit function but when this line is exist still in dokan-lite/classes/template-products.php:
    add_action( ‘template_redirect’, array( $this, ‘handle_all_submit’ ), 11 );

    my override function doesn’t work correctly.

    please help me for solve this problem

Viewing 5 replies - 1 through 5 (of 5 total)
  • @mahfelwp Hello, you don’t need to override any method to show error notice. You can use this filter hook dokan_can_add_product and dokan_can_edit_product to show errors.

    Thanks

    Thread Starter mahfelwp

    (@mahfelwp)

    Thanks for quick reply,can you give me an example code?

    Thread Starter mahfelwp

    (@mahfelwp)

    I added new field to add product and edit product page in dokan dashboard by override templates inside of my theme, is this a true method? or should be add new field with dokan action hook?

    and another question is:

    Save new field data with below action:

    add_action( ‘dokan_process_product_meta’, ‘dokan_add_fields_save’ );
    add_action( ‘dokan_product_updated’, ‘dokan_add_fields_save’ );
    add_action( ‘dokan_new_product_added’, ‘dokan_add_fields_save’ );

    which one is true or which one is wrong?

    1. You should add fields with the help of dokan action hooks.
    2. All those action hooks are correct.

    Thanks

    Thread Starter mahfelwp

    (@mahfelwp)

    Thanks a lot for your reply

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘remove “handle_all_submit” function from “Dokan_Template_Products” class’ is closed to new replies.