Just Create below file in your theme,
app/design/Companyname/Modulename/frontend/templates/Magento_Catalog/templates/product/view/attribute.phtml
Keep below content in attribute.phtml file,
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
// @codingStandardsIgnoreFile
/**
* Product view template
*
* @see \Magento\Catalog\Block\Product\View\Description
*/
?>
<?php
$_helper = $this->helper('Magento\Catalog\Helper\Output');
$_product = $block->getProduct();
$_call = $block->getAtCall();
$_code = $block->getAtCode();
$_className = $block->getCssClass();
$_attributeLabel = $block->getAtLabel();
$_attributeType = $block->getAtType();
$_attributeAddAttribute = $block->getAddAttribute();
$renderLabel = true;
// if defined as 'none' in layout, do not render
if ($_attributeLabel == 'none') {
$renderLabel = false;
}
if ($_attributeLabel && $_attributeLabel == 'default') {
$_attributeLabel = $_product->getResource()->getAttribute($_code)->getStoreLabel();
}
if ($_attributeType && $_attributeType == 'text') {
$_attributeValue = ($_helper->productAttribute($_product, $_product->$_call(), $_code)) ? $_product->getAttributeText($_code) : '';
} else {
$_attributeValue = $_helper->productAttribute($_product, $_product->$_call(), $_code);
}
?>
<?php if ($_attributeValue): ?>
<?php if ($_attributeLabel == 'SKU') { ?>
<div class="product attribute <?= /* @escapeNotVerified */ $_className ?>">
<?php if ($renderLabel): ?><strong class="type"><?= /* @escapeNotVerified */ $_attributeLabel ?></strong><?php endif; ?>
<div class="value" <?= /* @escapeNotVerified */ $_attributeAddAttribute ?>><?= /* @escapeNotVerified */ substr($_attributeValue, 0, -3) ?></div>
</div>
<?php } else { ?>
<div class="product attribute <?= /* @escapeNotVerified */ $_className ?>">
<?php if ($renderLabel): ?><strong class="type"><?= /* @escapeNotVerified */ $_attributeLabel ?></strong><?php endif; ?>
<div class="value" <?= /* @escapeNotVerified */ $_attributeAddAttribute ?>><?= /* @escapeNotVerified */ $_attributeValue ?></div>
</div>
<?php } ?>
<?php endif; ?>
Clear cache of system and check.
... View more