Incorrect Parameter Name in wpMandrill Plugin - 'meta_data' should be 'metadata' #93
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description:
I have noticed a minor issue in the wpMandrill plugin, which I believe is a bug. In the plugin, while sending emails and setting metadata, the parameter definition for metadata is named 'meta_data' instead of the correct 'metadata'. This inconsistency causes problems when trying to retrieve the metadata through the Mandrill API.
Steps to Reproduce:
Use the wpMandrill plugin to send an email.
Include metadata by passing an array to the 'meta_data' parameter in the 'wpMandrill::mail()' function.
Attempt to retrieve this metadata using the Mandrill API for the sent email.
Expected Behavior:
The plugin should use 'metadata' as the parameter name for setting metadata, which aligns with Mandrill's naming convention.
Actual Behavior:
The plugin uses 'meta_data' as the parameter name, which results in difficulties when trying to access the metadata through the Mandrill API. The API expects 'metadata' as the parameter name.
Additional Information:
This inconsistency may cause confusion and issues for users who want to work with the Mandrill API to retrieve email metadata.
It is a small but significant bug as it affects the plugin's functionality and compatibility with Mandrill.
To correct this, it is recommended to update the 'meta_data' parameter to 'metadata' in the plugin's codebase.
Please consider making this change in the wpMandrill plugin to ensure better compatibility with Mandrill and enhance user experience. Thank you for your attention to this matter.