Viewing 2 replies - 1 through 2 (of 2 total)
  • SherlockMac

    (@sherlockmac)

    Hey,
    Try _regular_price it works. I retrieved this in woocommerce control panel. You can use it for almost any of the meta keys.

    Cheers

    Define a custom field, example Price (cf_Price in DB), and put this code in wpuf-add-post.php at the end:

    //plugin API to extend the functionality
                do_action( 'wpuf_add_post_after_insert', $post_id );
    			$pret_nou = get_post_meta($post_id, 'cf_Pret',true);
    
    			update_post_meta($post_id, '_price',$pret_nou);
    
                update_post_meta($post_id, '_regular_price', $pret_nou);
    
                echo '<div class="success">' . __('Post published successfully', 'wpuf') . '</div>';
                if ( $post_id ) {
                    $redirect = apply_filters( 'wpuf_after_post_redirect', get_permalink( $post_id ), $post_id );
    
                    wp_redirect( $redirect );
                    exit;
                }

    . It worked for me, it updates the woocommerce price with the custom price inserted from the user front end

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘wp user frontend and price in woocommerce’ is closed to new replies.