• Resolved gbolahan96

    (@gbolahan96)


    Hello everyone i was wondering how i could change the redirection to added product page after clicking the submit button when adding a product. i would like to change the redirection to a page or url of my choice.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author WC Lovers

    (@wclovers)

    Hi,

    Thanks for get in touch with us.

    This is absolutely possible to achieve but I am afraid to say that there is no such settings panel for this.

    Using WCFM you can save a product in three statue – draft, pending and publish.
    Now all have different redirect URLs but all those passing through filters as well.

    So just adding few lines of code you can change those to your own.
    Here are the filters –

    1. Publish – wcfm_product_save_publish_redirect
    2. Pending – wcfm_product_save_pending_redirect
    3. Draft – wcfm_product_save_draft_redirect

    Please know me if you required any further assistance.

    Thank You

    Thread Starter gbolahan96

    (@gbolahan96)

    Thank you very much for your prompt response. Please i would like to know what file to edit

    Plugin Author WC Lovers

    (@wclovers)

    Hi,

    You don’t have to edit any WCfM files for this.

    You can change this urls from your child theme as well.

    If I send you the code can you integrate there?

    Thank You

    Thread Starter gbolahan96

    (@gbolahan96)

    Yes i can integrate. Kindly send the code. Thanks

    Plugin Author WC Lovers

    (@wclovers)

    Ahh .. that’s great.
    Here it is – you have to just replace YOUR_URL with own url:

    1. Publish –

    add_filter( ‘wcfm_product_save_publish_redirect’, function( $redirect_url ) {
    $redirect_url = YOUR_URL;
    return $redirect_url;
    });

    2. Pending –

    add_filter( ‘wcfm_product_save_pending_redirect’, function( $redirect_url ) {
    $redirect_url = YOUR_URL;
    return $redirect_url;
    });

    3. Draft –

    add_filter( ‘wcfm_product_save_draft_redirect’, function( $redirect_url ) {
    $redirect_url = YOUR_URL;
    return $redirect_url;
    });

    Please know me is this working for you or not!

    Thank You

    Thread Starter gbolahan96

    (@gbolahan96)

    Thanks. It works fine, I really appreciate the support

    Plugin Author WC Lovers

    (@wclovers)

    Thanks for confirming this to me.
    Feel free to reach us anytime for any assistance!

    Thank You

    I have the same issue. I want to be redirected back to the product manager page after pressing the submit button and not to the product’s page. I see your code above, but I have no idea where to put it. I am new at coding, so you would have to tell me which file to put that in and where. Can you help me? Thanks!

    Here’s my email address for a reply, [email protected]
    My site is https://thehairbowmaster.org
    I have the frontend manager ultimate and all of the add ons.

    Plugin Author WC Lovers

    (@wclovers)

    Hi,

    Kindly add these codes under child theme’s functions.php

    Thank You

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘How do i redirect to a specific page i want after adding a product’ is closed to new replies.