Skip to content

Conversation

@louwie17
Copy link
Contributor

Submission Review Guidelines:

Changes proposed in this Pull Request:

This PR removes the template and templateLock configs added in 7.6.1 by default and moves them to a filter, only added when a feature flag is enabled, as the template is needed for the new product block editor.

Closes #38269

How to test the changes in this Pull Request:

Using the WooCommerce Testing Instructions Guide, include your detailed testing instructions:

  1. Enable Gutenberg within the product block editor by either enabling this plugin: https://wordpress.org/plugins/blocks-product-editor-for-woocommerce/ or using this filter
function wplook_activate_gutenberg_products($can_edit, $post_type)
{
    if ($post_type == 'product') {
        $can_edit = true;
    }

    return $can_edit;
}
add_filter('use_block_editor_for_post_type', 'wplook_activate_gutenberg_products', 100, 2);
  1. Go to Products > Add New and notice how the block editor loads correctly for the product description
  2. Edit the product title and add some new blocks and saving the product (this should work correctly).
  3. Enable the product-block-editor feature flag using the WooCommerce Beta Tester plugin
  4. Refresh the page and go to Products > Add New
  5. The new product block editor should render correctly and allow you to add and save products.

@github-actions github-actions bot added focus: react admin [team:Ghidorah] plugin: woocommerce Issues related to the WooCommerce Core plugin. labels May 12, 2023
@louwie17 louwie17 requested a review from a team May 12, 2023 12:25
@github-actions
Copy link
Contributor

Hi , @woocommerce/mothra

Apart from reviewing the code changes, please make sure to review the testing instructions as well.

You can follow this guide to find out what good testing instructions should look like:
https://github.com/woocommerce/woocommerce/wiki/Writing-high-quality-testing-instructions

@github-actions
Copy link
Contributor

github-actions bot commented May 12, 2023

Test Results Summary

Commit SHA: cead6da

Test 🧪Passed ✅Failed 🚨Broken 🚧Skipped ⏭️Unknown ❔Total 📊Duration ⏱️
API Tests26700202690m 54s
E2E Tests1890010019923m 30s

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.

@codecov
Copy link

codecov bot commented May 12, 2023

Codecov Report

Merging #38276 (cead6da) into trunk (8c7fa2e) will increase coverage by 0.3%.
The diff coverage is 100.0%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             trunk   #38276     +/-   ##
==========================================
+ Coverage     51.2%    51.5%   +0.3%     
  Complexity   17439    17439             
==========================================
  Files          440      440             
  Lines        80722    80279    -443     
==========================================
- Hits         41348    41346      -2     
+ Misses       39374    38933    -441     
Impacted Files Coverage Δ
...ugins/woocommerce/includes/class-wc-post-types.php 1.8% <ø> (+0.8%) ⬆️
plugins/woocommerce/includes/wc-core-functions.php 63.6% <100.0%> (ø)

... and 1 file with indirect coverage changes

Copy link
Contributor

@joshuatf joshuatf left a comment

Choose a reason for hiding this comment

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

Testing well and code LGTM! Thanks for tackling this, @louwie17!

@louwie17 louwie17 merged commit 0ea5205 into trunk May 12, 2023
@louwie17 louwie17 deleted the fix/move_template_addition_to_featureflag branch May 12, 2023 16:28
@github-actions github-actions bot added this to the 7.8.0 milestone May 12, 2023
@psealock psealock modified the milestones: 7.8.0, 7.7.0 May 24, 2023
psealock pushed a commit that referenced this pull request May 24, 2023
* Remove template from product type and move to feature flag

* Add changelog

* Fix lint errors
psealock added a commit that referenced this pull request May 26, 2023
* Move template addition to feature flag (#38276)

* Remove template from product type and move to feature flag

* Add changelog

* Fix lint errors

* Fix merge conflicts

---------

Co-authored-by: louwie17 <[email protected]>
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.

Multiple issues when editing WooCommerce pages with the Block Editor

4 participants