🇨🇴Colombia kayograco
I tried this code to put the class "my-profile" into the body, but it breaks the site when clicking on "Orders" "Commerce" tab.
function MYTHEME_preprocess_page(array &$variables) {
$current_user = \Drupal::currentUser();
if ($user = \Drupal::routeMatch()->getParameter('user')) {
if ($user->id() == $current_user->id()) {
$variables['attributes']['class'][] = 'my-profile';
}
}
}
🐛 | Commerce Core | Product variation access makes it impossible to restrict product management to owners
🇨🇴Colombia kayograco
It would be nice to have this functionality out of the box with Commerce Core module. I don't know how to install a patch so I will have this issue on my marketplace until is officially released.
🇨🇴Colombia kayograco
kayograco → created an issue.
🇨🇴Colombia kayograco
kayograco → created an issue.