Skip to content

Fix: Add priority to 'shipping_phone' checkout field #1543

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

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

brandomeniconi
Copy link

My dev site is showing many notices in the WooCommerce checkout page:
Notice: Undefined index: priority in [..]/plugins/woocommerce/includes/wc-core-functions.php on line 1535

By tracing down the issue I found that this plugin didn't specify a priority for the shipping_phone field it adds to the shipping form in the add_shipping_phone_to_checkout. This causes PHP notices when WooCommerce tries to compare the fields priority indexes.

This PR add the priority key to the field, killing the warnings.

add the priority key to the 'shipping_phone' field in 'add_shipping_phone_to_checkout' function
@brezocordero brezocordero changed the base branch from master to trunk April 21, 2021 17:02
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