Skip to content
Snippets Groups Projects
Commit d259eec6 authored by Damian Skiba's avatar Damian Skiba
Browse files

Issue #3374298: Add accessCheck() for D10

parent 53054fac
No related branches found
Tags 2.0.4
1 merge request!4Issue #3374298: Add accessCheck() for D10
......@@ -21,6 +21,7 @@ function commerce_baselinker_ifirma_cron() {
$entityTypeManager = \Drupal::service('entity_type.manager');
$ordersToUpdate = $entityTypeManager->getStorage('commerce_order')
->getQuery()
->accessCheck(FALSE)
->condition('update_invoice', 1, '=')
->execute();
foreach ($ordersToUpdate as $revision => $orderId) {
......
......@@ -95,6 +95,7 @@ class OrdersService {
try {
$query = $this->entityTypeManager->getStorage('commerce_order')
->getQuery();
$query->accessCheck(FALSE);
$query->condition('state', 'completed', 'LIKE');
if (!empty($params['time_from'])) {
$query->condition('placed', $params['time_from'], '>=');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment