Can a plugin manually raise another plugin's Event? I have created an Adjuster which is attached to commerce_lineItems.onPopulateLineItem.

The discount criteria is based on validation of a completely separate coupon API, so I created a permission-less user group in order to allow my client to continue using the Commerce Discounts UI. In my adjuster, I had to override the the matchLineItem() method in order to bypass the $discount-&gt;allGroups check. I'm using Craft's httpSession to persist the criteria through the checkout process.

Everything works fine, however if the user adds a product to the cart and THEN authenticates, the discount doesn't get applied until they either a.) update the cart or b.) raise the commerce_lineItems.onPopulateLineItem event again.

I've tried adding craft()-&gt;commerce_orders-&gt;saveOrder($cart) at the end of a successful API call, however that doesn't seem to trigger the event.
Is there another event I can use that will also update the cart or can I somehow raise an already declared CEvent? I've tried everything I know including hitting actionUpdateCart() with Guzzle!

I know this is a very edge case situation, so just to (briefly) illustrate I've added a portion of my base plugin below.

public function init()
{
    require_once __DIR__ .'/vendor/autoload.php';
    $this-&gt;check_membership();
    /*
     Load Premium Member Adjusters if $is_premium_member is true
    */
    craft()-&gt;on('commerce_lineItems.onPopulateLineItem', function($event){

        $lineItem    = $event-&gt;params['lineItem'];

        if ($lineItem-&gt;purchasable instanceof Commerce_VariantModel){
            if ($this-&gt;is_premium_member) {
                $this-&gt;adjusters = [
                  599 =&gt; new WorkshopAdjuster
                ];
            }
        }
    });
}
I've built a plugin which uses it's own events before, I guess the way to do it would be the same for separate plugins, however this is untested for your use case.

This should go in your plugin service

// Import the event from the other plugin
Craft::import('plugins.otherPluginHandle.events.OtherPluginEvent');

/Initialise the plugins event and pass whatever is required to it.
$event = new OtherPluginEvent($this, array('request' =&gt; $request));

// Raise it.
$this-&gt;raiseEvent('OtherPluginEvent', $event);


Again I haven't tried this from the context of calling another plugins event, but that is what I do from a plugins own event...