0

I have an adjuster I am trying to get to work, but the order has to come from a specific site in order for the adjuster to be applied. The siteId is 2, but when I try to get the siteId from the Order Model I always get one.

public function adjust(Order $order): array
{
    die($order->siteId); // returns 1 no matter what site I created the order on
    if($order->siteId == 2){
        // code here
    }
}

Do I need to be passing the Site Id when creating the order? Or am I possibly messing something up somewhere?

  • Assuming this is for Commerce, what version? – Brad Bell Mar 19 at 22:04
  • Commerce 3.0.12 – Darryl Hardin Mar 25 at 14:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.