Edit Button once submitted

This topic contains 4 reply and 2 voices, and was last updated by Mahi 11 years ago
Viewing 4 Posts - 1 through 4 (of 4 total)
Author Posts
October 23, 2013 at 3:47 pm 9304
Mahi Ok, firstly I just saw you are Australian. Awesome. I was wondering (after playing with ALL the settings) is when a product (woocommerce) is submitted the user is redirected to the newly created page. I want the user to be able to edit the product if they want to. If you press back and edit the form you will create another product.
October 23, 2013 at 6:17 pm 9332
Mahi Mahi

You have to setup – edit page and then assign it accordingly.

Documentation:http://docs.wedevs.com/wp-user-frontend-pro/#post-editing

October 24, 2013 at 5:58 pm 9389
Kristopher Kristopher

Mahi,

I have created a video to explain what i mean

I have already created the edit page.

November 6, 2013 at 2:46 am 9790
Kristopher Kristopher

I got the answer for this. Please email me if you need krisdavant@yahoo.com

November 6, 2013 at 7:59 am 9796
Mahi Mahi

Hello @Kristopher,

So sorry for late reply mate. You have to use bellow code on your theme file where you want to insert edit option.

and make sure you enabled – “User can edit post” option from settings. Else, they will not be able to see this.

  <?php
                                if ( wpuf_get_option( 'enable_post_edit', 'wpuf_dashboard' ) == 'yes' ) {
                                    $disable_pending_edit = wpuf_get_option( 'disable_pending_edit', 'wpuf_dashboard', 'on' );
                                    $edit_page = (int) wpuf_get_option( 'edit_page_id', 'wpuf_general' );
                                    $url = add_query_arg( array('pid' => $post->ID), get_permalink( $edit_page ) );

                                    if ( $post->post_status == 'pending' && $disable_pending_edit == 'on' ) {
                                            // don't show the edit link
                                        } else {
                                            ?>
                                            <a href="<?php echo wp_nonce_url( $url, 'wpuf_edit' ); ?>"><?php _e( 'Edit', 'wpuf' ); ?></a>
                                        <?php
                                    }
                                }
                                ?>
Viewing 4 Posts - 1 through 4 (of 4 total)