Redirect after add product

We're shifting our Forum based support to a more dedicated support system!

We'll be closing our Forum support from 10th June, 2020 and move to Email Support assistance.

  • If you are a WCFM premium add-ons user, contact us- here
  • Want to know more before buying our add-ons? Send Pre sale queries- here
  • If you are a WCFM free user, please open a support ticket at WordPress.org
  • For WCFM App related queries, reach us- here
From now the forum will be read-only!

Tagged: 

Viewing 1 reply thread
  • Author
    Posts
    • #102505
      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.

Viewing 1 reply thread
  • You must be logged in to reply to this topic.