If you've ever gone through your Magento 2 checkout and wondered why there's a gift message box or a gift wrapping option staring at your customers, even though your store sells, say, industrial pipes or accounting software, you're in the right place.
In this guide, we'll walk through exactly what gift options are in Magento 2, why you might want to remove them, and three different ways to do it depending on your comfort level with the platform.
Whether you're a store owner who's never touched code, or a developer who wants the cleanest possible solution, there's a method here for you.
First, What Exactly Are "Gift Options" in Magento 2?
Before removing anything, it's worth understanding what you're dealing with.
Magento 2 ships with a built-in feature called Gift Options, powered by the `Magento_GiftMessage` module (and `Magento_GiftWrapping` on the Enterprise/Commerce edition).
When enabled, these options can appear in a few places during checkout:
Gift Messages allow a customer to attach a personal message to their entire order, or even to individual items within the order. You've probably seen this on stores like Amazon: "Happy Birthday! Enjoy your gift."
Gift Wrapping (Enterprise Edition only) lets customers choose a wrapping style and usually pay an extra fee for it.
Gift Receipt and Printed Card options are also toggleable in Enterprise Edition.
The way these appear in checkout is through Magento's JavaScript-based checkout framework (built on KnockoutJS).
They're injected as UI components, which is why removing them isn't always as simple as just hiding a div with CSS.
Think of Magento's checkout as a complex machine built from many LEGO pieces. Gift options are one of those pieces.
You can remove them by either telling the machine's settings to hide them, swapping out that LEGO piece with a blank one, or physically intercepting the process that snaps the piece into place.
All three approaches are valid, and we'll cover all of them.
Why Would You Want to Remove Gift Options?
There are plenty of legitimate reasons:
Your store doesn't sell gift-worthy products. If you sell B2B equipment, downloadable software, or raw materials, gift messages are just clutter that confuses customers.
You want a faster, distraction-free checkout. Every extra element on a checkout page is a potential friction point. Removing irrelevant options can directly improve conversion rates.
You're dealing with a custom theme or headless setup where the gift options component is breaking your layout.
Your client or stakeholder has simply decided they don't want it, and that's reason enough.
Method 1: The Admin Panel Way (No Code Required)
This is the right starting point for anyone who manages their Magento store through the admin dashboard. It's quick, reversible, and requires zero developer knowledge.
Step #1. Log into your Magento Admin Panel.
Navigate to the backend URL of your store (usually `yourstore.com/admin`).
Step #2. Go to Stores → Configuration.
In the left sidebar, click on "Stores," then select "Configuration" from the dropdown.
Step #3. Navigate to Sales → Gift Options.
In the left panel of the Configuration page, look under the "Sales" section and click on "Gift Options."
Step #4. Disable everything.
You'll see a series of dropdown toggles. Set all of them to "No":
- Allow Gift Messages for Order → No
- Allow Gift Messages for Order Items → No
- Allow Gift Wrapping on Order Level → No (Enterprise Edition)
- Allow Gift Wrapping for Order Items → No (Enterprise Edition)
- Allow Gift Receipt → No (Enterprise Edition)
- Allow Printed Card → No (Enterprise Edition)
Step #5. Save the configuration.
Click the orange "Save Config" button in the top right.
Step #6. Clear your cache.
Go to System → Cache Management and flush the Magento cache (or click "Flush Magento Cache").
That's it. The gift options will no longer appear on your checkout page.
Important note: The admin panel method is scope-aware. If you manage multiple stores or store views within one Magento installation, make sure you're configuring the right scope. The scope selector is at the top of the Configuration page, switch from "Default Config" to your specific website or store view if needed.
Method 2: Removing via Theme Layout XML (Developer Approach)
Sometimes the admin toggle isn't enough, especially if you're building a custom theme and want to ensure gift options are architecturally excluded from the checkout rendering pipeline.
This approach uses Magento's layout XML system.
Think of layout XML files as blueprints that tell Magento what blocks and components to draw on each page.
By creating your own version of the checkout's layout blueprint, you can surgically tell Magento to skip the gift options component.
Where to Put the File
You'll create (or modify) this file inside your active theme:
app/design/frontend/[YourVendor]/[YourTheme]/Magento_GiftMessage/layout/checkout_index_index.xml
Replace [YourVendor] and [YourTheme] with your actual vendor and theme names. For example, if your theme is `Acme/StoreFront`, the path would be:
app/design/frontend/Acme/StoreFront/Magento_GiftMessage/layout/checkout_index_index.xml
If the directories don't exist yet, create them. Magento follows a convention where placing a file in a module-specific folder within your theme automatically overrides that module's default layout for that page.
The Layout XML Content
|
After saving this file, run the following commands from your Magento root directory:
php bin/magento cache:flush
php bin/magento setup:static-content:deploy # Only needed if in production mode
Why This Works
Magento's checkout is powered by a deeply nested JavaScript configuration object called `jsLayout`.
This object is built server-side from layout XML files and then passed to the browser as JSON. The checkout's KnockoutJS components then read this config to decide what to render.
By merging our XML override into that config tree, we're replacing the gift options component definition with an empty children array, essentially telling the checkout renderer "this component exists, but has nothing to show."
Method 3: Custom Module with a PHP Plugin (The Most Robust Developer Approach)
If you want the cleanest and most maintainable solution, one that works regardless of which theme is active, survives theme switches, and can be deployed across environments via version control, creating a small custom module with a plugin is the way to go.
This approach uses Magento's Plugin (Interceptor) system, which lets you intercept the output of existing methods without modifying core code.
Think of it like adding a filter to a pipeline: the gift options data flows in, your plugin catches it, removes what you don't want, and passes the cleaned result forward.
Step 1: Create the Module Directory Structure
Inside `app/code/`, create the following folder and file structure:
app/code/YourVendor/RemoveGiftOptions/
├── etc/
│ ├── module.xml
│ └── di.xml
├── Plugin/
│ └── RemoveGiftOptionsFromCheckout.php
└── registration.php
|
Step 2: registration.php
This file tells Magento that your module exists.
<?php
// This file registers your module with Magento's component system.
// Without it, Magento won't know to load your module at all.
use Magento\Framework\Component\ComponentRegistrar;
ComponentRegistrar::register(
ComponentRegistrar::MODULE,
'YourVendor_RemoveGiftOptions',
__DIR__
);
|
Step 3: etc/module.xml
This declares your module's name and version, and specifies that it should be loaded after the GiftMessage module (so we can safely modify its output).
<?xml version="1.0"?>
|
Step 4: etc/di.xml
This is where you wire your plugin to Magento's dependency injection system.
You're telling Magento: "Whenever `Magento\Checkout\Block\Onepage::getJsLayout()` is called, also run my plugin code after it."
<?xml version="1.0"?> |
Step 5: Plugin/RemoveGiftOptionsFromCheckout.php
This is the heart of the solution, the actual plugin class that modifies the checkout's JavaScript configuration to remove gift options before it's sent to the browser.
<?php
namespace YourVendor\RemoveGiftOptions\Plugin;
use Magento\Checkout\Block\Onepage;
class RemoveGiftOptionsFromCheckout
{
/**
* After plugin on Onepage::getJsLayout()
*
* The "after" prefix tells Magento this method runs after getJsLayout().
* The method receives $subject (the Onepage block instance) and $result
* (the JSON string that getJsLayout() returned). We decode it, remove
* what we don't want, then re-encode and return it.
*
* @param Onepage $subject - The original block (we don't need to use it here)
* @param string $result - The JSON string of the checkout jsLayout config
* @return string - The modified JSON string
*/
public function afterGetJsLayout(Onepage $subject, string $result): string
{
// Decode the JSON string into a PHP array so we can manipulate it
$jsLayout = json_decode($result, true);
// --- Remove gift options from the Shipping Step ---
// This is the "Order Level" gift message that appears on the shipping form
$shippingChildren = &$jsLayout['components']['checkout']['children']['steps']
['children']['shipping-step']['children']['shippingAddress']['children'];
if (isset($shippingChildren['gift-options'])) {
unset($shippingChildren['gift-options']);
}
// --- Remove gift options from the Payment/Billing Step ---
// Some Magento setups also inject gift options after the payment methods section
$afterMethods = &$jsLayout['components']['checkout']['children']['steps']
['children']['billing-step']['children']['payment']['children']['afterMethods']['children'];
if (isset($afterMethods['gift-options'])) {
unset($afterMethods['gift-options']);
}
// Re-encode the modified array back to a JSON string and return it
return json_encode($jsLayout);
}
}
|
Step 6: Enable the Module and Clear Cache
Run these commands from your Magento root directory:
# Register the new module with Magento
php bin/magento module:enable YourVendor_RemoveGiftOptions
# Run setup to apply the new configuration
php bin/magento setup:upgrade
# Flush all caches
php bin/magento cache:flush
# If you're in production mode, also recompile and redeploy static content
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy -f
After this, reload your checkout page and the gift options should be completely gone.
Wait — Are You Removing Gift Options, or Just Replacing Them with Something Better?
Before you start writing the module, take a moment to ask yourself this: are you removing gift options because you don't want gifting at all, or because Magento's built-in gifting is too limited for what you're trying to do?
There's a real difference between the two.
Magento's native gift options are basically just text boxes, a customer can type a message, and that's about it.
There's no intelligence behind it, no promotions engine, no way to automatically offer a free gift when a customer hits a certain cart value.
If your store actually wants to use gifting as a conversion tool (think: "Spend $100 and get a free product automatically added to your cart"), the native feature isn't going to get you there.
That's exactly the gap that MageAnts' Free Gift for Magento 2 fills.
It's a dedicated extension that gives you rule-based free gift automation, you define the conditions (minimum cart total, specific products, customer groups, coupon codes), and the extension handles everything else: automatically adds the qualifying free gift to the cart, shows a popup notification, lets customers choose from multiple gift options if you want, and integrates cleanly with Magento's native cart rules system.
So instead of just stripping out the native clutter and stopping there, you can replace it with something that actively drives sales.
Here's where each path makes sense:
Remove and leave it gone → If your store genuinely has no use for gift-based promotions, the custom module below is the right call. Clean, simple, done.
Remove the native version and use MageAnts instead → If you want gifting as a marketing tool rather than a clutter item, remove the native options using any of the three methods in this guide, then install and configure the MageAnts Free Gift extension on top. You get a blank slate plus a purpose-built tool.
The MageAnts extension is compatible with Magento 2.x Community and Commerce editions and comes with full configuration support from the admin panel, no additional coding needed after installation
Which Method Should You Use?
Here's a simple way to think about it:
If you're a store owner or non-developer, use Method 1 (Admin Panel). It's instant, requires no files, and is easy to reverse if you change your mind.
If you're a developer working within a custom theme and want the removal baked into the theme itself, Method 2 (Layout XML) is clean and straightforward. Just remember it's theme-dependent, if the theme changes, the removal goes with it.
If you're a developer who wants a solution that lives in its own module, is independent of any theme, and can be version-controlled and deployed across staging and production environments, Method 3 (Custom Module + Plugin) is the gold standard. It also makes it easy to conditionally re-enable gift options in the future by simply disabling the module.
A Quick Word on Cache Clearing
No matter which method you use, always clear Magento's cache afterward. Magento aggressively caches layout XML, block output, and configuration, so changes won't appear until the cache is refreshed.
The fastest way via command line:
php bin/magento cache:flush
Or via the Admin Panel: System → Cache Management → Flush Magento Cache.
If your changes still don't appear after flushing cache, try clearing your browser cache too, and if you're in production mode, run `setup:di:compile` and `setup:static-content:deploy` as well.
Wrapping Up!
Removing gift options from the Magento 2 checkout is one of those tasks that sounds straightforward but has layers of complexity under the hood, partly because Magento's checkout is built as a dynamic JavaScript application, not a simple set of PHP-rendered HTML templates.
The good news is that all three methods described above are reliable and well-supported. The admin panel toggle is perfect for quick configuration. The layout XML override gives you theme-level control. And the custom module plugin gives you surgical, version-controllable precision.
Whichever path you take, the result is the same: a cleaner, more focused checkout experience that presents customers only with what they actually need, which is almost always better for conversion rates and user experience.
If you run into issues, the most common culprits are a lingering cache that hasn't been properly cleared, a scope mismatch in the admin configuration (wrong store view selected), or an incorrect file path for your layout XML or module files. Double-check those three things and you'll be in good shape.
Have questions or running into a specific issue with your setup? Drop them in the comments below, the more detail you share about your Magento version and setup, the easier it is to help.
Need Help With Your Magento 2 Store?
If reading through all of this made you realize your store needs more than just a quick config tweak, whether that's a full checkout customization, performance improvements, extension development, or setting up something like the MageAnts Free Gift extension, we're here to help.
At MageAnts, we've been working with Magento stores of all shapes and sizes for years. Our team offers end-to-end Magento 2 development services , from custom module development and theme building to store migrations , speed optimizations, and third-party integrations.
We also build and maintain a library of purpose-built Magento 2 extensions, including Hyvä Compatible Extensions as well as the Free Gift extension covered in this guide, designed to solve real store problems without the overhead of building from scratch.
Whether you're a solo store owner trying to figure out why something isn't working, or a growing brand that needs a development partner to handle ongoing Magento work, we'd love to talk.
Browse our Magento 2 Extensions →
Get in Touch With Our Team →
No pressure, no sales pitch, just a straightforward conversation about what your store needs and how we can help.