Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regression "woocommerce-order-items" postbox gets hidden when "dokan_commission_box" is hidden #2499

Open
oliviertassinari opened this issue Jan 5, 2025 · 0 comments

Comments

@oliviertassinari
Copy link

oliviertassinari commented Jan 5, 2025

Bug Description

This logic can't work:

<div id="woocommerce-order-items" class="postbox" style='border: none'>

WordPress hides blocks using this logic:

hidden = $( '.postbox' ).filter( ':hidden' ).map( function() { return this.id; } ).get().join( ',' );

Souce: https://github.com/WordPress/WordPress/blob/aa87f886780f31edc1f9148ed16cf36046d7f9bf/wp-admin/js/postbox.js#L462

And because :hidden match is broad: https://api.jquery.com/hidden-selector/

An ancestor element is hidden, so the element is not shown on the page

it means that hiding "dokan_commission_box" also sets "woocommerce-order-items" as hidden

See the structure of the DOM:

Screen.Recording.2025-01-05.at.16.42.53.mov

It gets even worse, because there are two woocommerce-order-items on the page, once one is hidden and the page is released, the logic sets the two as hidden, and it's impossible to show back without sending custom cURL requests or updating the database: https://wordpress.org/support/topic/edit-order-product-details-no-longer-possible/#post-18226349

Step To Reproduce

Screen.Recording.2025-01-05.at.16.46.24.mov

Additional Information

There has been a lot of regressions lately:

and now this one. Please do something about it, we can't sustain this pace.

Environment (please complete the following information)

1. Dokan Version: v3.14.4

cc @hasdfa for awareness, in case someone complains about this bug internally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant