Skip to content

Commit

Permalink
Account for update operations when determining package type
Browse files Browse the repository at this point in the history
  • Loading branch information
webdeveric committed Jun 13, 2017
1 parent 0985c71 commit 6179941
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,9 @@ public function handleEvent(PackageEvent $event)
*/
protected function isWordPressCore(PackageEvent $event) : bool
{
return $event->getOperation()->getPackage()->getType() === self::PACKAGE_TYPE;
$operation = $event->getOperation();
$package = method_exists($operation, 'getTargetPackage') ? $operation->getTargetPackage() : $operation->getPackage();

return $package->getType() === self::PACKAGE_TYPE;
}
}

0 comments on commit 6179941

Please sign in to comment.