GraphQL.php 398 Bytes
Newer Older
王源's avatar
王源 committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
<?php
/**
 * Created by PhpStorm.
 * User: Zero
 * Time: 2021/1/14 9:16
 */

namespace Meibuyu\Micro\Shopify\tools;

class GraphQL
{

    public static function parseDeliveryProfileId($gid)
    {
        if ($gid && stripos($gid, 'gid://shopify/DeliveryProfile/') !== false) {
            $gid = str_replace('gid://shopify/DeliveryProfile/', '', $gid);
        }
        return (int)$gid;
    }

}