Still on Drupal 7? Security support for Drupal 7 ended on 5 January 2025. Please visit our Drupal 7 End of Life resources page to review all of your options.
I have spent literally days trying to install the necessary files to make drupal commerce work in 8.3. All of the commerce modules are available to install but installation gets stuck on the commerceguys/addressing library:
(Address requires the commerceguys/addressing library.)
function YOURMODULENAME_menu_local_tasks_alter(&$local_tasks) {
$node = \Drupal::routeMatch()->getParameter('node');
if ($node instanceof \Drupal\node\NodeInterface) {
// You can get nid and anything else you need from the node object.
$nid = $node->id();
$node_modified = $node->YOURFIELDNAME->getValue();
$node_modified = $node_modified[0]['value'];
if ($node_modified == 1) {
unset($local_tasks['tabs'][0]['entity.node.edit_form']);
}
}
}