• Resolved dgavega

    (@dgavega)


    I need a separate report where the field value of all the forms should be shown & the value filtered based on forms. Is there any such addon report I am ready to buy?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support Vivek Acowebs

    (@viveke)

    Hi,

    To achieve your goal of displaying all the values of the fields from the orders in a column on the WooCommerce orders page, you can use our WCPA plugin along with the following code snippet added to your theme’s functions.php file:

    add_filter( 'manage_edit-shop_order_columns', 'wcpa_report_column', 10, 1 );
    
    function wcpa_report_column( $columns ) {
    
        $columns['_adddon_report'] = 'Addon Report';
    
        return $columns;
    
    }
    
    add_action( 'manage_shop_order_posts_custom_column', 'wcpa_report_column_data', 10, 1 );
    
    function wcpa_report_column_data( $column ) {
    
        global $post;
    
        if ( '_adddon_report' === $column ) {
    
            $order_id = $post->ID;
    
            $order = wc_get_order( $order_id );
    
            $types = array( 'line_item');
    
            foreach( $order->get_items( $types ) as $item_id => $item ) {
    
                echo "<p><b>Item:</b> ".$item->get_name()."</p>";
    
                $meta_data = $item->get_formatted_meta_data('');
    
                foreach ( $meta_data as $meta_id => $meta ) {
    
                    $field_display_label = wp_kses_post( $meta->display_key );
    
                    echo "<li style='list-style:square;'><div style='display:inline-flex;'><p><b>".$field_display_label.":</b> </p>".$meta->display_value."</div></li>";
    
                }
    
            }
    
        }
    
    }

    The outcome will be like in the screenshot.

    Thanks.

    Thread Starter dgavega

    (@dgavega)

    I need a separate report page where I can export, filter & search data.
    like this: Screenshot

    I created this custom plugin on my own in 2021 but after the new update, the plugin is not working.

    From clicking on the drop-down to display that particular form field. Each form field is displayed as a column.

    Is there any such addon report plugin I am ready to buy.

    Plugin Support Vivek Acowebs

    (@viveke)

    Hi,

    We currently do not have a report plugin available.

    However, if you could kindly share us your report plugin,
    we would be more than happy to assist you in testing it and ensuring compatibility with the latest addon version.

    Thanks.

    Thread Starter dgavega

    (@dgavega)

    Okay, I will share my plugin file but where to share plugin file.

    Plugin Support Vivek Acowebs

    (@viveke)

    Hi,

    We recommend to create a ticket through our website and upload the file through it.

    Thanks.

    Thread Starter dgavega

    (@dgavega)

    I have created ticket & attached my custom plugin file.

    ticket ID 21341
    please check and let me know soon.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘I need Separate report of addon forms fields value’ is closed to new replies.