• Resolved kayalone

    (@kayalone)


    Is there a code that redirect to specific link after adding a new product in WCFM front-end manager?
    I have tried some codes but those not working:

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

    and

    apply_filters( 'wcfm_product_save_publish_redirect', get_wcfm_edit_product_url( $new_product_id ), $new_product_id );
    

    So I need another way to achieve my request.

    Thank you

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

    (@wclovers)

    Try this revised code. Between, this works only when you are publishing a product, not for “draft” or “submit for review”.

    add_filter( 'wcfm_product_save_publish_redirect', function( $redirect_url ) {
    $redirect_url = 'MY URL';
    return $redirect_url;
    }, 50, 1 );
    Thread Starter kayalone

    (@kayalone)

    The code works well

    Thank you so much.

    Thread Starter kayalone

    (@kayalone)

    I have another question please..
    Is there a code for redirect after submit and review?, not after publishing.

    Thank you

    Plugin Author WC Lovers

    (@wclovers)

    Sure, use this snippet –

    add_filter( 'wcfm_product_save_pending_redirect', function( $redirect_url ) {
    $redirect_url = 'MY URL';
    return $redirect_url;
    }, 50, 1 );
    Thread Starter kayalone

    (@kayalone)

    It works well

    Thank you for your effort.

    Plugin Author WC Lovers

    (@wclovers)

    Glad to know ??

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Redirect after adding new product’ is closed to new replies.