Redirect after add product

Tagged: 

This topic contains 1 reply, has 2 voices, and was last updated by Avatar Sarmistha Chakraborty 4 weeks, 1 day ago.

  • Author
    Posts
  • #102505
    Avatar
    Ivan Black
    Participant

    Hello,

    How do I redirect to the products page (/store-manager/products/) after submitting a product?

    Thank you

  • #103014

    Hello,

    add_filter('wcfm_product_save_pending_redirect','after_wcfm_product_submit_redirect');
    add_filter('wcfm_product_save_publish_redirect','after_wcfm_product_submit_redirect');
    function after_wcfm_product_submit_redirect($redirect_to){
      global $WCFM;
      $wcfm_page = get_wcfm_page();
      $redirect_to = wcfm_get_endpoint_url( 'wcfm-products', '', $wcfm_page );
      return $redirect_to;
    }

    Add this code to your child theme’s functions.php

    In case you do not have child theme then add code using this plugin – https://wordpress.org/plugins/code-snippets/

    Thanks.

You must be logged in to reply to this topic.