Skip to content

EVENT_BEFORE_FETCH_RATES not triggering #141

Description

@apitel

Describe the bug

Postie is not triggering this EVENT_BEFORE_FETCH_RATES event when a cart is marked as completed to transition into order. Line vendor/verbb/postie/src/base/Provider.php:515 is not being reached because Postie does not see our plugin's EVENT_BEFORE_FETCH_RATES handler.

image

This is our code where we have define our EVENT_BEFORE_FETCH_RATES handler and it is being triggered whenever any order is being updated (but not when a cart is marked as completed):

image

Steps to reproduce

  1. Define Define EVENT_BEFORE_FETCH_RATES in custom plugin based on https://verbb.io/craft-plugins/postie/docs/developers/events#the-beforeFetchRates-event example
  2. Start creating a new Order through CP
  3. Press "Mark as completed"
  4. Notice that EVENT_BEFORE_FETCH_RATES is not triggered
  5. Re-save the same order and notice that EVENT_BEFORE_FETCH_RATES is triggered

Craft CMS version

Craft Pro 5.3.4

Plugin version

dev-craft-5

Multi-site?

Yes

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions