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

Allow external code to provide shipment tracking data #863

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

Conversation

Kimmax
Copy link

@Kimmax Kimmax commented Nov 21, 2023

Add filter mollie_shipment_tracking_data to allow adding externally provided shipment tracking data before calling shipAll().
Fixes #425

Allow external code to provide shipment tracking data before calling `shipAll()` on mollie order
@fjbender
Copy link

Thanks for you contribution! This looks like an easy enough change. @asotela3911 what do you think?

@Kimmax
Copy link
Author

Kimmax commented Nov 22, 2023

Maybe should add some kind of verification / documentation / make sure the returned data is in the correct format:

add_filter('mollie_shipment_tracking_data', function ($input, $order) {
    return [
        'tracking' => [
            'carrier' => '...',
            'code' => '...',
            'url' => '...',
        ];
    ];
}, 10, 2);

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.

Submitting a valid tracking instead of a plain shipAll()
2 participants