简体   繁体   中英

Magento 2.3 - Hel to change "const CUSTOM_CARRIER_CODE = 'custom';"

would anyone be able to suggest a method or modification to replace the "custom" value with a different word? Eg from "custom" to "Fantasy Shipping".

The "custom" value is proposed in Magento 2.3 whenever the title is not valued. I would like to be able to replace "custom" value with the custom one every time the field is empty.

Do you think it's enough to modify the value in: magento2/vendor/magento/module-sales/Model/Order/Shipment/Track.php (line 25)

/**
 * @method \Magento\Sales\Model\ResourceModel\Order\Shipment\Track _getResource()
 * @method \Magento\Sales\Model\ResourceModel\Order\Shipment\Track getResource()
 *
 * @author      Magento Core Team <core@magentocommerce.com>
 * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
 */
class Track extends AbstractModel implements ShipmentTrackInterface
{
    /**
     * Code of custom carrier
     */
    const CUSTOM_CARRIER_CODE = 'custom';

Thanks to anyone who can help me!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM