Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • Evolved

    (@evolved)

    Yep, at least its possible I guess.

    Evolved

    (@evolved)

    Hi Debeecher,

    We modified the Customer History metabox to show things like

    Customer age: 4.7 years (since 11 Nov 2019)
    Total orders: 32
    Total revenue: $12,820.23
    Average order value: $400.63
    Average order daterange: Every 54 days

    we used the filter “wc_get_template” to redirect the customer history template to a self-defined template file in a plugin we may release soon:

    add_filter( 'wc_get_template',
    function ($template, $template_name, $args) {
    
        if ($template_name === 'order/customer-history.php') {
            return plugin_dir_path( __FILE__ ) . 'woocommerce/templates/order/customer-history.php';
        }
    
        return $template;
    },
    10,
    3);

    In customer-history.php you can place things like Total Revenue, and modify $total_spend as you like:
    e.g.

    <h4>
        <?php
        esc_html_e( 'Total revenue', 'woocommerce' );
        echo wp_kses_post(
            wc_help_tip(
                __( "This is the Customer Lifetime Value, or the total amount you have earned from this customer's orders.", 'woocommerce' )
            )
        );
        ?>
    </h4>
    <span class="order-attribution-total-spend">
        <?php echo wp_kses_post( wc_price( $total_spend ) ); ?>
    </span>
    Evolved

    (@evolved)

    Good question @dabeecher we’re looking for editing the Customer History Panel this too. If we find something will let you know.

    Hi, we had this issue too, Clayton seems to have fixed it, uninstall and re-install, worked a treat for us.

    Evolved

    (@evolved)

    Same issue for me, the plugin has now stopped working including Google Analytics entirely.

    Trying to save my GA ID just gives me loads of errors now such as:
    Warning: array_key_exists() expects parameter 2 to be array, string given in /home/XXX/wp-content/plugins/enhanced-e-commerce-for-woocommerce-store/admin/class-enhanced-ecommerce-google-analytics-settings.php on line 58

    When can we expect a solution to this please?

Viewing 5 replies - 1 through 5 (of 5 total)