{"id":86591,"date":"2017-06-16T15:27:30","date_gmt":"2017-06-16T15:27:30","guid":{"rendered":"https:\/\/webkul.com\/blog\/?p=86591"},"modified":"2023-04-26T04:30:25","modified_gmt":"2023-04-26T04:30:25","slug":"using-php-traits-opencart","status":"publish","type":"post","link":"https:\/\/webkul.com\/blog\/using-php-traits-opencart\/","title":{"rendered":"Using PHP Traits with Opencart"},"content":{"rendered":"<p>According to <a href=\"http:\/\/php.net\/manual\/en\/language.oop5.traits.php\" target=\"_blank\" rel=\"noopener noreferrer\">PHP documentation<\/a>, Traits are a mechanism for code reuse in single inheritance languages such as PHP. A Trait is intended to reduce some limitations of single inheritance by enabling a developer to reuse sets of methods freely in several independent classes living in different class hierarchies.<\/p>\n<p>We must keep in mind that a Trait can not be instantiated. Neither it can extend a class nor\u00a0a trait itself. The best part of Traits is that its members can be accessed without using inheritance.<\/p>\n<p>The basic syntax of Traits:<\/p>\n<pre class=\"brush:php\">&lt;?php\ntrait traitName {\n    public function method1() { \/\/ user defined method\n        \/\/ something\n    }\n    public function method2() { \/\/ user defined method\n        \/\/ something\n    }\n}\n?&gt;\n<\/pre>\n<p>We can easily use the trait by simply write the trait name after the &#8216;use&#8217; keyword in a class. For example:<\/p>\n<pre class=\"brush:php\">&lt;?php\nclass Test {\n  use traitName;\n}\n?&gt;\n<\/pre>\n<p>We can use the Traits in the Opencart as well. A simple example to show how it works in the Opencart.<\/p>\n<pre class=\"brush:php\">&lt;?php\n\/**\n * Webkul Software.\n *\n * @category Webkul\n * @package PHP Concepts\n * @author Webkul\n * @copyright Copyright (c) Webkul Software Private Limited (https:\/\/webkul.com)\n * @license https:\/\/store.webkul.com\/license.html\n *\/\ntrait traitExample {\n    public function common1() {\n        echo 'Something common1';\n    }\n    public function common2() {\n        echo 'Something common2';\n    }\n}\nclass ControllerTestTest extends Controller { \/\/ class declaration in the Opencart\n    use traitExample; \/\/ using trait\n    public function index() {\n        $this-&gt;common1(); \/\/ calling the trait's method\n    }\n}\n?&gt;\n<\/pre>\n<p>Now, here&#8217;s the example of the application of the Trait in the Opencart. This is an example to convert the currency using the Google&#8217;s API.<\/p>\n<p>So, in order to use the trait, we have created a file with the name trait.php\u00a0and put this code to it.<\/p>\n<pre class=\"brush:php\">&lt;?php\n\/**\n * Webkul Software.\n *\n * @category Webkul\n * @package PHP Concepts\n * @author Webkul\n * @copyright Copyright (c) Webkul Software Private Limited (https:\/\/webkul.com)\n * @license https:\/\/store.webkul.com\/license.html\n *\/\ntrait traitCurrency {\n    public function convertCurrency($from_currency, $to_currency, $amount) {\n      if($from_currency == $to_currency) {\n        return round($amount, 2);\n      }\n      $amount = urlencode($amount);\n      $from_currency = urlencode($from_currency);\n      $to_currency = urlencode($to_currency);\n\n      $url = \"http:\/\/www.google.com\/finance\/converter?a=$amount&amp;from=$from_currency&amp;to=$to_currency\";\n\n      $ch = curl_init();\n      $timeout = 0;\n      curl_setopt ($ch, CURLOPT_URL, $url);\n      curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);\n\n      curl_setopt ($ch, CURLOPT_USERAGENT, \"Mozilla\/4.0 (compatible; MSIE 8.0; Windows NT 6.1)\");\n      curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);\n      $rawdata = curl_exec($ch);\n      curl_close($ch);\n      $data = explode('bld&gt;', $rawdata);\n      $data = explode($to_currency, $data[1]);\n\n      return round($data[0], 2);\n    }\n}\n?&gt;\n<\/pre>\n<p>Now, we will use this Trait in our Opencart controller&#8217;s class.\u00a0Here&#8217;s the code to that.<\/p>\n<pre class=\"brush:php\">&lt;?php\n\/**\n * Webkul Software.\n *\n * @category Webkul\n * @package PHP Concepts\n * @author Webkul\n * @copyright Copyright (c) Webkul Software Private Limited (https:\/\/webkul.com)\n * @license https:\/\/store.webkul.com\/license.html\n *\/\ninclude 'catalog\/controller\/test\/trait.php'; \/\/ first, including the file\n\nclass ControllerTestTest extends Controller {\n    use traitCurrency;\n    public function index() {\n        $converted = $this-&gt;convertCurrency('USD', 'INR', 50); \/\/ \n        print_r($converted);\n    }\n}\n?&gt;\n<\/pre>\n<p>So,\u00a0here we end up with a few examples of traits and also its application with the Opencart.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>According to PHP documentation, Traits are a mechanism for code reuse in single inheritance languages such as PHP. A Trait is intended to reduce some limitations of single inheritance by enabling a developer to reuse sets of methods freely in several independent classes living in different class hierarchies. We must keep in mind that a <a href=\"https:\/\/webkul.com\/blog\/using-php-traits-opencart\/\">[&#8230;]<\/a><\/p>\n","protected":false},"author":70,"featured_media":41008,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[305,13],"tags":[2071,2057,4939,4938],"class_list":["post-86591","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-opencart","category-php","tag-opencart","tag-php","tag-trait","tag-traits"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Using PHP Traits with Opencart - Webkul Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/webkul.com\/blog\/using-php-traits-opencart\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Using PHP Traits with Opencart - Webkul Blog\" \/>\n<meta property=\"og:description\" content=\"According to PHP documentation, Traits are a mechanism for code reuse in single inheritance languages such as PHP. A Trait is intended to reduce some limitations of single inheritance by enabling a developer to reuse sets of methods freely in several independent classes living in different class hierarchies. We must keep in mind that a [...]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webkul.com\/blog\/using-php-traits-opencart\/\" \/>\n<meta property=\"og:site_name\" content=\"Webkul Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webkul\/\" \/>\n<meta property=\"article:published_time\" content=\"2017-06-16T15:27:30+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-04-26T04:30:25+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/02\/Opencart-Code-Snippet.png\" \/>\n\t<meta property=\"og:image:width\" content=\"825\" \/>\n\t<meta property=\"og:image:height\" content=\"260\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Vikhyat Sharma\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@webkul\" \/>\n<meta name=\"twitter:site\" content=\"@webkul\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Vikhyat Sharma\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/webkul.com\/blog\/using-php-traits-opencart\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/using-php-traits-opencart\/\"},\"author\":{\"name\":\"Vikhyat Sharma\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/af7160d2546c64a1856ab1b5ce77d9b0\"},\"headline\":\"Using PHP Traits with Opencart\",\"datePublished\":\"2017-06-16T15:27:30+00:00\",\"dateModified\":\"2023-04-26T04:30:25+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/using-php-traits-opencart\/\"},\"wordCount\":219,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/using-php-traits-opencart\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/02\/Opencart-Code-Snippet.png\",\"keywords\":[\"opencart\",\"PHP\",\"trait\",\"traits\"],\"articleSection\":[\"opencart\",\"php\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/webkul.com\/blog\/using-php-traits-opencart\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/webkul.com\/blog\/using-php-traits-opencart\/\",\"url\":\"https:\/\/webkul.com\/blog\/using-php-traits-opencart\/\",\"name\":\"Using PHP Traits with Opencart - Webkul Blog\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/using-php-traits-opencart\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/using-php-traits-opencart\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/02\/Opencart-Code-Snippet.png\",\"datePublished\":\"2017-06-16T15:27:30+00:00\",\"dateModified\":\"2023-04-26T04:30:25+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/webkul.com\/blog\/using-php-traits-opencart\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/webkul.com\/blog\/using-php-traits-opencart\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/using-php-traits-opencart\/#primaryimage\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/02\/Opencart-Code-Snippet.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/02\/Opencart-Code-Snippet.png\",\"width\":825,\"height\":260},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/webkul.com\/blog\/using-php-traits-opencart\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/webkul.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Using PHP Traits with Opencart\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/webkul.com\/blog\/#website\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"name\":\"Webkul Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/webkul.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/webkul.com\/blog\/#organization\",\"name\":\"WebKul Software Private Limited\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"width\":380,\"height\":380,\"caption\":\"WebKul Software Private Limited\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webkul\/\",\"https:\/\/x.com\/webkul\",\"https:\/\/www.instagram.com\/webkul\/\",\"https:\/\/www.linkedin.com\/company\/webkul\",\"https:\/\/www.youtube.com\/user\/webkul\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/af7160d2546c64a1856ab1b5ce77d9b0\",\"name\":\"Vikhyat Sharma\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/7c9c700cc2d7120c9faf1ab3392b4e533808ba197f58c0441d6caecc68179e12?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/7c9c700cc2d7120c9faf1ab3392b4e533808ba197f58c0441d6caecc68179e12?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"caption\":\"Vikhyat Sharma\"},\"url\":\"https:\/\/webkul.com\/blog\/author\/vikhyat-sharma83\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Using PHP Traits with Opencart - Webkul Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/webkul.com\/blog\/using-php-traits-opencart\/","og_locale":"en_US","og_type":"article","og_title":"Using PHP Traits with Opencart - Webkul Blog","og_description":"According to PHP documentation, Traits are a mechanism for code reuse in single inheritance languages such as PHP. A Trait is intended to reduce some limitations of single inheritance by enabling a developer to reuse sets of methods freely in several independent classes living in different class hierarchies. We must keep in mind that a [...]","og_url":"https:\/\/webkul.com\/blog\/using-php-traits-opencart\/","og_site_name":"Webkul Blog","article_publisher":"https:\/\/www.facebook.com\/webkul\/","article_published_time":"2017-06-16T15:27:30+00:00","article_modified_time":"2023-04-26T04:30:25+00:00","og_image":[{"width":825,"height":260,"url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/02\/Opencart-Code-Snippet.png","type":"image\/png"}],"author":"Vikhyat Sharma","twitter_card":"summary_large_image","twitter_creator":"@webkul","twitter_site":"@webkul","twitter_misc":{"Written by":"Vikhyat Sharma","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/webkul.com\/blog\/using-php-traits-opencart\/#article","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/using-php-traits-opencart\/"},"author":{"name":"Vikhyat Sharma","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/af7160d2546c64a1856ab1b5ce77d9b0"},"headline":"Using PHP Traits with Opencart","datePublished":"2017-06-16T15:27:30+00:00","dateModified":"2023-04-26T04:30:25+00:00","mainEntityOfPage":{"@id":"https:\/\/webkul.com\/blog\/using-php-traits-opencart\/"},"wordCount":219,"commentCount":0,"publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"image":{"@id":"https:\/\/webkul.com\/blog\/using-php-traits-opencart\/#primaryimage"},"thumbnailUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/02\/Opencart-Code-Snippet.png","keywords":["opencart","PHP","trait","traits"],"articleSection":["opencart","php"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/webkul.com\/blog\/using-php-traits-opencart\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/webkul.com\/blog\/using-php-traits-opencart\/","url":"https:\/\/webkul.com\/blog\/using-php-traits-opencart\/","name":"Using PHP Traits with Opencart - Webkul Blog","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/webkul.com\/blog\/using-php-traits-opencart\/#primaryimage"},"image":{"@id":"https:\/\/webkul.com\/blog\/using-php-traits-opencart\/#primaryimage"},"thumbnailUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/02\/Opencart-Code-Snippet.png","datePublished":"2017-06-16T15:27:30+00:00","dateModified":"2023-04-26T04:30:25+00:00","breadcrumb":{"@id":"https:\/\/webkul.com\/blog\/using-php-traits-opencart\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webkul.com\/blog\/using-php-traits-opencart\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/using-php-traits-opencart\/#primaryimage","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/02\/Opencart-Code-Snippet.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/02\/Opencart-Code-Snippet.png","width":825,"height":260},{"@type":"BreadcrumbList","@id":"https:\/\/webkul.com\/blog\/using-php-traits-opencart\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/webkul.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Using PHP Traits with Opencart"}]},{"@type":"WebSite","@id":"https:\/\/webkul.com\/blog\/#website","url":"https:\/\/webkul.com\/blog\/","name":"Webkul Blog","description":"","publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/webkul.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/webkul.com\/blog\/#organization","name":"WebKul Software Private Limited","url":"https:\/\/webkul.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","width":380,"height":380,"caption":"WebKul Software Private Limited"},"image":{"@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webkul\/","https:\/\/x.com\/webkul","https:\/\/www.instagram.com\/webkul\/","https:\/\/www.linkedin.com\/company\/webkul","https:\/\/www.youtube.com\/user\/webkul\/"]},{"@type":"Person","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/af7160d2546c64a1856ab1b5ce77d9b0","name":"Vikhyat Sharma","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/7c9c700cc2d7120c9faf1ab3392b4e533808ba197f58c0441d6caecc68179e12?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/7c9c700cc2d7120c9faf1ab3392b4e533808ba197f58c0441d6caecc68179e12?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","caption":"Vikhyat Sharma"},"url":"https:\/\/webkul.com\/blog\/author\/vikhyat-sharma83\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/86591","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/users\/70"}],"replies":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/comments?post=86591"}],"version-history":[{"count":4,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/86591\/revisions"}],"predecessor-version":[{"id":378238,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/86591\/revisions\/378238"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/media\/41008"}],"wp:attachment":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/media?parent=86591"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/categories?post=86591"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/tags?post=86591"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}