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

Capture Charge bulk action option is being added to other list tables #724

Open
iamdharmesh opened this issue Oct 22, 2024 · 2 comments
Open

Comments

@iamdharmesh
Copy link

The Capture Charge bulk action option is added to other list tables when HPOS order storage is enabled. It is intended for capturing order payments and should only be displayed on the orders list table. However, it is currently appearing in the bulk action dropdowns of other list tables. For example: Plugins list table, Posts/Pages list table.

image

Based on a quick check, it seems the maybe_add_capture_charge_bulk_order_action() method is hooked to admin_footer and doesn't have the appropriate checks to target only the orders list. As a result, it is applied to all list tables.

add_action( 'admin_footer', [ $this, 'maybe_add_capture_charge_bulk_order_action' ] );

@unfulvio
Copy link
Member

@agibson-godaddy It looks like there's a missing check in the callback to see if the current screen is woocommerce_page_wc-orders when the admin_footer is the current_action(): this should be an easy fix -- currently all gateways implementing the FW are affected

@agibson-godaddy
Copy link
Contributor

Thank you for the info! Will aim to get this fixed for the next release.

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

3 participants