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

validate_document & add_auto_capture_dropdown should be static #870

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

VictorMinemu
Copy link

No description provided.

@VictorMinemu
Copy link
Author

These two methods are called statically. In a production environment, it makes PHP fail making the order page crash.
Here is an example debug log:

[13-Nov-2021 23:46:06 UTC] PHP Fatal error:  Uncaught TypeError: call_user_func_array(): Argument #1 ($callback) must be a valid callback, non-static method EBANX\Plugin\Services\WC_EBANX_Capture_Payment::add_auto_capture_dropdown() cannot be called statically in /homepages/31/d802735309/htdocs/..../wp-includes/class-wp-hook.php:303
Stack trace:
#0 /homepages/31/d802735309/htdocs/..../wp-includes/plugin.php(189): WP_Hook->apply_filters(Array, Array)
#1 /homepages/31/d802735309/htdocs/..../wp-content/plugins/woocommerce/includes/admin/meta-boxes/class-wc-meta-box-order-actions.php(40): apply_filters('woocommerce_ord...', Array)
#2 /homepages/31/d802735309/htdocs/..../wp-admin/includes/template.php(1395): WC_Meta_Box_Order_Actions::output(Object(WP_Post), Array)
#3 /homepages/31/d802735309/htdocs/..../wp-admin/edit-form-advanced.php(681): do_meta_boxes(Object(WP_Screen), 'side', Object(WP_Post))
#4 /homepages/31/d802735309/htdocs/..../wp-admin/post.php(206): require('/homepages/31/d...')
#5 {main}
  thrown in /homepages/31/d802735309/htdocs/..../wp-includes/class-wp-hook.php on line 303

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

Successfully merging this pull request may close these issues.

1 participant