• Resolved Lekcie

    (@lekciewp)


    Hi,

    Is there a PHP function (or anything else) to get the backend analytics charts?

    For instance, I’d like to get the orders charts /wp-admin/admin.php?page=wc-admin&path=%2Fanalytics%2Foverview page so I can display it on frontend (using a PHP function or shortcode).

    Thanks!

    Geoffrey

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi @lekciewp

    Thanks for reaching out!

    Currently, WooCommerce does not provide a direct PHP function or shortcode to display the backend analytics charts on the front end. The analytics data is specifically designed to be viewed within the WooCommerce admin area for security and privacy reasons.

    However, you can consider using the WooCommerce REST API to fetch the data you need and then use a charting library to display this data on the front end. Please note that this would require custom coding and a good understanding of both PHP and JavaScript.

    Unfortunately, custom coding is not something we can assist with directly. However, I’ll keep this thread open for a bit to see if anyone from the community can lend a hand.

    If you have any other questions related to development or custom coding, don’t hesitate to reach out to some of the great resources we have available for support. The WooCommerce community is filled with talented open-source developers, and many of them are active on the channels listed below:

    Hope this helps!

    Thread Starter Lekcie

    (@lekciewp)

    Hi @xue28

    Thanks for your answer. I’ll develop my own solution then.

    Best,

    G

    Hi @lekciewp,

    Thanks for your answer. I’ll develop my own solution then.

    I’m glad to hear that you’re moving forward with developing your own solution. It’s great to see users like you leveraging the flexibility of WooCommerce to meet their unique needs.

    I’ll go ahead and mark this thread as resolved. However, if you ever have more questions or issues in the future, don’t hesitate to kick off a new topic.

    I hope your development process goes smoothly, and you have a fantastic day!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘PHP function to show analytics charts ?’ is closed to new replies.