New Module Toggle: Disable Deprecated Functions to Trim JavaScript Size

Less code means faster pages. With version 1.53.0, Pixel Manager introduces a new toggle to disable the deprecated functions module entirely, trimming unnecessary JavaScript from your WooCommerce store.
✅ TL;DR
- New setting to disable deprecated functions module
- Reduces front-end JavaScript by removing legacy compatibility code
- Safe to disable if you don't use custom code relying on old event names
- Part of a new modular architecture for optional features
What Are Deprecated Functions?
Over time, Pixel Manager has evolved its API. Event names have been standardized, consent functions have been reorganized, and naming conventions have become more consistent. To avoid breaking existing custom integrations, we've maintained backward compatibility through a deprecated functions module.
This module maps old event and function names to their modern equivalents:
| Old (Deprecated) | New (Current) |
|---|---|
wpmAddToCart | pmw:add-to-cart |
wpmBeginCheckout | pmw:begin-checkout |
wpmViewItem | pmw:view-item |
wpmOrderReceivedPage | pmw:purchase |
pmw.consentAcceptAll() | pmw.consent.api.acceptAll() |
pmw.consentRevokeAll() | pmw.consent.api.revokeAll() |
| ...and more |
If you have custom JavaScript that listens to these old events or calls these old functions, the deprecated module ensures everything still works.
The New Toggle
Starting with version 1.53.0, you can now disable this module entirely:
Location: Pixel Manager → Advanced → General → Load Deprecated Functions
When enabled (default):
- Old event names and function names continue to work
- Full backward compatibility with custom integrations
- Slightly larger JavaScript bundle
When disabled:
- Deprecated functions module is not loaded
- Smaller JavaScript footprint
- Old event/function names will no longer work
Should You Disable It?
Safe to disable if:
- You don't have any custom JavaScript using Pixel Manager events
- Your custom code already uses the modern
pmw:*event format - You're starting fresh with no legacy integrations
- You want to optimize for the smallest possible JavaScript size
Keep enabled if:
- You have custom tracking code using old event names like
wpmAddToCart - Third-party plugins integrate with Pixel Manager using deprecated APIs
- You're not sure what custom code exists on your site
- Backward compatibility is more important than a few KB of JavaScript
Not sure if you're using deprecated functions? Disable the toggle, clear your caches, and browse your site while watching the browser console. If anything breaks or logs errors about missing events, re-enable the toggle.
Part of a Larger Modular Architecture
This toggle is the first in a new modules system we're building into Pixel Manager. The architecture allows us to:
- Make optional features truly optional (not loaded if disabled)
- Load modules on demand using code splitting
- Give you granular control over what JavaScript runs on your store
- Continue adding features without bloating the core library
The deprecated functions module is now loaded as a separate chunk. When disabled, that chunk is never requested: zero bytes, zero network requests.
// How it works under the hood
if (wpmDataLayer?.general?.modules?.load_deprecated_functions !== false) {
const { loadDeprecatedFunctions } = await import("./wpm/deprecated.mjs");
loadDeprecatedFunctions();
}
Combined with Code Splitting
This module toggle works hand-in-hand with the code splitting introduced in version 1.50.0. Together, these optimizations mean:
- Only active pixels load their JavaScript
- Only enabled modules load their JavaScript
- The base library stays lean
- Your pages load faster
Every kilobyte saved contributes to better Core Web Vitals and a snappier shopping experience.
How to Enable/Disable
- Go to Pixel Manager → Advanced → General
- Find the Load Deprecated Functions checkbox
- Uncheck to disable, check to enable
- Click Save Changes
- Clear any page caches
That's it. No code changes required.
Looking Ahead
The modules system opens the door for more optional features in the future. We're evaluating which components make sense as toggleable modules, always with the goal of keeping Pixel Manager fast and flexible.
If you have suggestions for features that should be optional, let us know.
Interested to get updates?
Sign up to our monthly newsletter today.Questions about deprecated functions or the new modules system? Reach out at [email protected].
