{"id":374185,"date":"2023-03-28T06:45:40","date_gmt":"2023-03-28T06:45:40","guid":{"rendered":"https:\/\/webkul.com\/blog\/?p=374185"},"modified":"2025-09-22T10:37:28","modified_gmt":"2025-09-22T10:37:28","slug":"how-to-create-custom-cart-rule-in-magento-2","status":"publish","type":"post","link":"https:\/\/webkul.com\/blog\/how-to-create-custom-cart-rule-in-magento-2\/","title":{"rendered":"How to create custom cart rules in magento 2"},"content":{"rendered":"\n<p>Magento 2 offers powerful cart rules by default. However, sometimes you need more, and you might want to <strong>create custom cart rules<\/strong> rather than just override core functionality.<\/p>\n\n\n\n<p>Below is a clear guide on how to add a custom cart rule in Magento 2.<\/p>\n\n\n\n<p><strong>Why Add a Custom Cart Rule?<\/strong><\/p>\n\n\n\n<p>Cart rules allow promotions like discounts, free shipping, and more. Yet, the standard set may not always match your business needs.<\/p>\n\n\n\n<p>Therefore, by creating a custom cart rule, you can tailor the rules exactly to your marketing strategy. Moreover, this makes your Magento instance cleaner since you avoid core overrides.<\/p>\n\n\n\n<p><strong>Overview of the Process<\/strong><\/p>\n\n\n\n<p>To build a custom cart rule in Magento 2, you need to:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>First add your custom option to the <strong>\u201cApply\u201d dropdown<\/strong> in the Admin panel.<\/li>\n\n\n\n<li>Second map the custom option to a new discount calculator class via dependency injection.<\/li>\n\n\n\n<li>Finally write the logic for discount calculation in your new class.<\/li>\n<\/ul>\n\n\n\n<p><strong>Step 1: Add Your Custom Option to the Admin Dropdown<\/strong><\/p>\n\n\n\n<p>First, create a plugin for the <em><code>Magento\\SalesRule\\Model\\Rule\\Metadata\\ValueProvider::getMetadataValues()<\/code> <\/em>method.<\/p>\n\n\n\n<p>This plugin should inject your new option under <code>simple_action<\/code>.<\/p>\n\n\n\n<p>For example, in <code><em>Webkul\/CartRule\/etc\/adminhtml\/di.xml<\/em><\/code> define:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">&lt;type name=&quot;Magento\\SalesRule\\Model\\Rule\\Metadata\\ValueProvider&quot;&gt;\n    &lt;plugin name=&quot;salesrule-plugin&quot; type=&quot;Webkul\\CartRule\\Plugin\\Rule\\Metadata\\ValueProvider&quot; sortOrder=&quot;1&quot;\/&gt;\n&lt;\/type&gt;<\/pre>\n\n\n\n<p>Then, in the plugin class <code>Webkul\\CartRule\\Plugin\\Rule\\Metadata\\ValueProvider<\/code>, implement <code>afterGetMetadataValues(...)<\/code> to push your custom action such as <em>\u201cBuy X Get next Y with M% discount\u201d<\/em>.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>Step 2: Tie the New Option to a Discount Calculator via DI<\/strong><\/p>\n\n\n\n<p>Next, connect your custom simple_action key to a discount-handling class. This is done through Magento\u2019s DI (dependency injection) configuration.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">&lt;type name=&quot;Magento\\SalesRule\\Model\\Rule\\Action\\Discount\\CalculatorFactory&quot;&gt;\n    &lt;arguments&gt;\n        &lt;argument name=&quot;discountRules&quot; xsi:type=&quot;array&quot;&gt;\n            &lt;item name=&quot;buy_x_get_next_y_with_percent&quot; xsi:type=&quot;string&quot;&gt;\\\n            Webkul\\CartRule\\Model\\Rule\\Action\\Discount\\BuyXGetNextYWithPercent\\\n            &lt;\/item&gt;\n        &lt;\/argument&gt;\n    &lt;\/arguments&gt;\n&lt;\/type&gt;<\/pre>\n\n\n\n<p>This tells Magento which class to use when the action type <code>buy_x_get_next_y_with_percent<\/code> is selected.<\/p>\n\n\n\n<p><strong>Step 3: Implement the Discount Logic<\/strong><\/p>\n\n\n\n<p>Now you need a class (for example, <code>BuyXGetNextYWithPercent<\/code>) under <code>Webkul\\CartRule\\Model\\Rule\\Action\\Discount\\<\/code>.<\/p>\n\n\n\n<p>This class should extend <code>AbstractDiscount<\/code> or implement the required interface.<\/p>\n\n\n\n<p>Within it, you define:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong><code>calculate(...)<\/code><\/strong>: entry point, receives rule, item, qty.<\/li>\n\n\n\n<li><strong><code>_calculate(...)<\/code><\/strong> (or similar helper): logic to compute how many items match X, which items should get Y, percentage discount, rounding, etc.<\/li>\n<\/ul>\n\n\n\n<p>You also have to set the discount amounts (base, original) properly.<\/p>\n\n\n\n<p><strong>Step 4: Create and Test the Rule<\/strong><\/p>\n\n\n\n<p>Once your plugin, DI, and discount class are in place, flush cache, run <code>setup:di:compile<\/code>, and then:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Go to Admin \u2192 Marketing \u2192 Cart Price Rules.<\/li>\n\n\n\n<li>Create a new rule. You should now see your custom action <em>\u201cBuy X Get next Y with M% discount\u201d<\/em> in the Apply dropdown.<\/li>\n\n\n\n<li>Test with various cart scenarios to ensure correct discount application.<\/li>\n<\/ul>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>Best Practices &amp; Tips<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Always account for <strong>edge cases<\/strong> \u2014 if a customer adds more than X, or mixture of items, fractional quantities, etc.<\/li>\n\n\n\n<li>Ensure correct <strong>currency handling<\/strong> (base vs store) and <strong>rounding<\/strong> so totals match across pages.<\/li>\n\n\n\n<li>Maintain <strong>translation support<\/strong> for labels.<\/li>\n\n\n\n<li>Include <strong>unit \/ integration testing<\/strong> to avoid regressions when Magento or your other modules update.<\/li>\n<\/ul>\n\n\n\n<p>For more details and implementation, please check the blog: <a href=\"https:\/\/webkul.com\/blog\/how-to-create-a-custom-cart-rule-for-buy-x-get-next-y-with-percent-discount-in-magento-2\/\">cart rule for Buy X Get next Y<\/a><\/p>\n\n\n\n<p><strong>Related Tools &amp; Extensions<\/strong><\/p>\n\n\n\n<p>If you want to expand cart-rule capabilities without custom code, you might like Webkul\u2019s <em>Magento 2 Special Promotions<\/em> module, which adds many pre-built advanced cart\/checkout promotions.<\/p>\n\n\n\n<p> You can explore it here: <a href=\"https:\/\/webkul.com\/blog\/magento2-special-promotions-module\/\">Magento2 Special Promotions Module<\/a>.<\/p>\n\n\n\n<p>Also, to learn how to create cart rules in magento 2 you can explore it here: <a href=\"https:\/\/experienceleague.adobe.com\/en\/docs\/commerce-admin\/marketing\/promotions\/cart-rules\/price-rules-cart-create\">Create a cart price rule<\/a><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>Conclusion<\/strong><\/p>\n\n\n\n<p>Creating a custom cart rule in Magento 2 involves injecting a custom option in admin, wiring that option via DI to a discount calculator class, and implementing the discount logic.<\/p>\n\n\n\n<p>With proper planning, careful testing, and attention to edge cases, you can deliver flexible promotions tailored to your business. Happy coding!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Magento 2 offers powerful cart rules by default. However, sometimes you need more, and you might want to create custom cart rules rather than just override core functionality. Below is a clear guide on how to add a custom cart rule in Magento 2. Why Add a Custom Cart Rule? Cart rules allow promotions like <a href=\"https:\/\/webkul.com\/blog\/how-to-create-custom-cart-rule-in-magento-2\/\">[&#8230;]<\/a><\/p>\n","protected":false},"author":372,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[302,13],"tags":[13885,13886,2460,2070,106,590],"class_list":["post-374185","post","type-post","status-publish","format-standard","hentry","category-magento2","category-php","tag-cart-rule","tag-custom-cartrule","tag-magento-2","tag-magento2","tag-marketplace","tag-webkul"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to create custom cart rules in magento 2 - Webkul Blog<\/title>\n<meta name=\"description\" content=\"Learn how to create a custom cart rules in Magento 2 with step-by-step instructions. Add new Apply options\" \/>\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\/how-to-create-custom-cart-rule-in-magento-2\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to create custom cart rules in magento 2 - Webkul Blog\" \/>\n<meta property=\"og:description\" content=\"Learn how to create a custom cart rules in Magento 2 with step-by-step instructions. Add new Apply options\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webkul.com\/blog\/how-to-create-custom-cart-rule-in-magento-2\/\" \/>\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=\"2023-03-28T06:45:40+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-09-22T10:37:28+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-og.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"630\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Sushil Kumar\" \/>\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=\"Sushil Kumar\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/webkul.com\/blog\/how-to-create-custom-cart-rule-in-magento-2\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-create-custom-cart-rule-in-magento-2\/\"},\"author\":{\"name\":\"Sushil Kumar\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/513087aa54cb0448c572658ecfcad038\"},\"headline\":\"How to create custom cart rules in magento 2\",\"datePublished\":\"2023-03-28T06:45:40+00:00\",\"dateModified\":\"2025-09-22T10:37:28+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-create-custom-cart-rule-in-magento-2\/\"},\"wordCount\":561,\"commentCount\":2,\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"keywords\":[\"cart rule\",\"custom cartRule\",\"Magento 2\",\"Magento2\",\"marketplace\",\"webkul\"],\"articleSection\":[\"Magento2\",\"php\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/webkul.com\/blog\/how-to-create-custom-cart-rule-in-magento-2\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/webkul.com\/blog\/how-to-create-custom-cart-rule-in-magento-2\/\",\"url\":\"https:\/\/webkul.com\/blog\/how-to-create-custom-cart-rule-in-magento-2\/\",\"name\":\"How to create custom cart rules in magento 2 - Webkul Blog\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/#website\"},\"datePublished\":\"2023-03-28T06:45:40+00:00\",\"dateModified\":\"2025-09-22T10:37:28+00:00\",\"description\":\"Learn how to create a custom cart rules in Magento 2 with step-by-step instructions. Add new Apply options\",\"breadcrumb\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-create-custom-cart-rule-in-magento-2\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/webkul.com\/blog\/how-to-create-custom-cart-rule-in-magento-2\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/webkul.com\/blog\/how-to-create-custom-cart-rule-in-magento-2\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/webkul.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to create custom cart rules in magento 2\"}]},{\"@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\/513087aa54cb0448c572658ecfcad038\",\"name\":\"Sushil Kumar\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/c74cd7e0ce5fab0c3fa41d3e51de621a5492bea06afc4b577f10416abddf1ed3?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\/c74cd7e0ce5fab0c3fa41d3e51de621a5492bea06afc4b577f10416abddf1ed3?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"caption\":\"Sushil Kumar\"},\"url\":\"https:\/\/webkul.com\/blog\/author\/sushil-kumar419\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to create custom cart rules in magento 2 - Webkul Blog","description":"Learn how to create a custom cart rules in Magento 2 with step-by-step instructions. Add new Apply options","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\/how-to-create-custom-cart-rule-in-magento-2\/","og_locale":"en_US","og_type":"article","og_title":"How to create custom cart rules in magento 2 - Webkul Blog","og_description":"Learn how to create a custom cart rules in Magento 2 with step-by-step instructions. Add new Apply options","og_url":"https:\/\/webkul.com\/blog\/how-to-create-custom-cart-rule-in-magento-2\/","og_site_name":"Webkul Blog","article_publisher":"https:\/\/www.facebook.com\/webkul\/","article_published_time":"2023-03-28T06:45:40+00:00","article_modified_time":"2025-09-22T10:37:28+00:00","og_image":[{"width":1200,"height":630,"url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-og.png","type":"image\/png"}],"author":"Sushil Kumar","twitter_card":"summary_large_image","twitter_creator":"@webkul","twitter_site":"@webkul","twitter_misc":{"Written by":"Sushil Kumar","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/webkul.com\/blog\/how-to-create-custom-cart-rule-in-magento-2\/#article","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/how-to-create-custom-cart-rule-in-magento-2\/"},"author":{"name":"Sushil Kumar","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/513087aa54cb0448c572658ecfcad038"},"headline":"How to create custom cart rules in magento 2","datePublished":"2023-03-28T06:45:40+00:00","dateModified":"2025-09-22T10:37:28+00:00","mainEntityOfPage":{"@id":"https:\/\/webkul.com\/blog\/how-to-create-custom-cart-rule-in-magento-2\/"},"wordCount":561,"commentCount":2,"publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"keywords":["cart rule","custom cartRule","Magento 2","Magento2","marketplace","webkul"],"articleSection":["Magento2","php"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/webkul.com\/blog\/how-to-create-custom-cart-rule-in-magento-2\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/webkul.com\/blog\/how-to-create-custom-cart-rule-in-magento-2\/","url":"https:\/\/webkul.com\/blog\/how-to-create-custom-cart-rule-in-magento-2\/","name":"How to create custom cart rules in magento 2 - Webkul Blog","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/#website"},"datePublished":"2023-03-28T06:45:40+00:00","dateModified":"2025-09-22T10:37:28+00:00","description":"Learn how to create a custom cart rules in Magento 2 with step-by-step instructions. Add new Apply options","breadcrumb":{"@id":"https:\/\/webkul.com\/blog\/how-to-create-custom-cart-rule-in-magento-2\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webkul.com\/blog\/how-to-create-custom-cart-rule-in-magento-2\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/webkul.com\/blog\/how-to-create-custom-cart-rule-in-magento-2\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/webkul.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to create custom cart rules in magento 2"}]},{"@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\/513087aa54cb0448c572658ecfcad038","name":"Sushil Kumar","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/c74cd7e0ce5fab0c3fa41d3e51de621a5492bea06afc4b577f10416abddf1ed3?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\/c74cd7e0ce5fab0c3fa41d3e51de621a5492bea06afc4b577f10416abddf1ed3?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","caption":"Sushil Kumar"},"url":"https:\/\/webkul.com\/blog\/author\/sushil-kumar419\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/374185","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\/372"}],"replies":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/comments?post=374185"}],"version-history":[{"count":8,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/374185\/revisions"}],"predecessor-version":[{"id":507259,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/374185\/revisions\/507259"}],"wp:attachment":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/media?parent=374185"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/categories?post=374185"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/tags?post=374185"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}