Update the history interface on the profile page. Use a newer React based interface, simplify the data and make it easier to follow.

This will likely include updates to various logging of events changes.

Updates

  • Update invoices expansion panel to provide links to Stripe invoices.
    Eliminated secondary list of “view live invoice” to shorten the display output.
  • Add the Sites list to the Site Info panel.
    Moved into the collapsible Site Info panel versus a static display that could not be hidden.
  • History Interface Updated
    Moved from a PHP inline HTML to a React JavaScript interface.
  • New history entries dropped repetitive blog information.
    Each history entry repeated the Blog ID, account name, account URL, and Customer name.
    This is present in the profile header and does not need to be logged on every entry.
  • Speed up history loading by 5x.
    (added index to history log, change query to use direct integer comparison)
  • Eliminated the Environment panel.
    Did not provide useful information for the SaaS user.

Findings

The My Profile interface is rendered via \MySLP_Customer_Profile::page_profile

It includes wp-content/plugins/myslp-dashboard/include/customer_profile/views/view.profile.php as inline PHP to generate the page.

This talks to the MySLP History Logger plugin and uses \MySLP_Customer_History::get_user_history to render the history stack. It is passed the blog ID of the user.

SLP Architecture

\MySLP_Customer_History::get_user_history

* @param int $blog_id  the blog to show the history for
*
* @var MySLP $myslp

For “ice cream” the passed blog_id = 310 and BLOG_ID_CURRENT_SITE = 1 (this will always be 1).


Leave a Reply