Skip to content

Conversation

@jorgeatorres
Copy link
Member

@jorgeatorres jorgeatorres commented Nov 3, 2022

All Submissions:

Changes proposed in this Pull Request:

This PR adds a couple of new rows to the "Settings" section of the Status Report, with info about the order datastore in use and whether data sync is enabled or not (when HPOS is enabled).

Screenshot 2022-11-03 at 12 23 09

Note: I've added the new rows under "Settings" but maybe we'll eventually need a different section for this sort of information (such as current implementations of product or other data stores). Not sure if that's worth doing now.

Closes #34864.

  • This PR is a very minor change/addition and does not require testing instructions (if checked you can ignore/remove the next section).

How to test the changes in this Pull Request:

  1. Go to WC > Status.
  2. Scroll down to "Settings".
  3. Confirm that there is a new row "Order datastore" with the classname for the current order datastore.
  4. If HPOS is enabled, there should be another row "HPOS data sync enabled" indicating whether data sync has been enabled or not.
  5. Repeat the above with different configurations of HPOS and data sync (enabled/disabled).

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes, as applicable?
  • Have you created a changelog file for each project being changed, ie pnpm --filter=<project> changelog add?

FOR PR REVIEWER ONLY:

  • I have reviewed that everything is sanitized/escaped appropriately for any SQL or XSS injection possibilities. I made sure Linting is not ignored or disabled.

@jorgeatorres jorgeatorres requested a review from a team November 3, 2022 17:29
@github-actions github-actions bot added the plugin: woocommerce Issues related to the WooCommerce Core plugin. label Nov 3, 2022
@jorgeatorres jorgeatorres requested review from barryhughes and removed request for a team November 3, 2022 17:29
@github-actions
Copy link
Contributor

github-actions bot commented Nov 3, 2022

Test Results Summary

Commit SHA: 121ff33

Test 🧪Passed ✅Failed 🚨Broken 🚧Skipped ⏭️Unknown ❔Total 📊Duration ⏱️
API Tests25900302621m 12s
E2E Tests186006019216m 34s

To view the full API test report, click here.
To view the full E2E test report, click here.
To view all test reports, visit the WooCommerce Test Reports Dashboard.

@jorgeatorres
Copy link
Member Author

Hi @barryhughes!

Thanks for the suggestion. That was what I intended to do but maybe I got confused with all of our features/controller enabled() methods and didn't properly check what I ended up using 😅.

I've committed your suggestion and this is now ready for another look. Thanks!

<td class="help"><?php echo wc_help_tip( esc_html__( 'Datastore currently in use for orders.', 'woocommerce' ) ); ?></td>
<td><?php echo esc_html( WC_Data_Store::load( 'order' )->get_current_class_name() ); ?></td>
</tr>
<?php if ( wc_get_container()->get( Automattic\WooCommerce\Internal\Features\FeaturesController::class )->feature_is_enabled( 'custom_order_tables' ) ) : ?>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now I'm also wondering, would it be useful to indicate if transactions are in effect (and show either the isolation level, like REPEATABLE READ or else simply No)? However, that wasn't noted in the original issue and can easily be added later if we think it should be added—no need to hold up this PR.

Copy link
Member

@barryhughes barryhughes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great!

@barryhughes barryhughes merged commit 082f318 into trunk Nov 4, 2022
@barryhughes barryhughes deleted the add/34864-order-data-store-in-ssr branch November 4, 2022 18:35
@github-actions github-actions bot added this to the 7.2.0 milestone Nov 4, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Nov 4, 2022

Hi @barryhughes, thanks for merging this pull request. Please take a look at these follow-up tasks you may need to perform:

  • Add the release: add testing instructions label

@peterfabian
Copy link
Contributor

peterfabian commented Mar 24, 2023

Just a note here that we need to add the items to the REST API code and only read it in the template to ensure consistency.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

plugin: woocommerce Issues related to the WooCommerce Core plugin.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[COT/HPOS] Integrate with SSR

4 participants