JS_Localization
Handles the localization of JavaScript strings for the theme. This class generates an array of text strings used in JavaScript, which can be filtered and sanitized before being passed to the frontend.
- Full name:
\BigCommerce\Assets\Theme\JS_Localization
Methods
get_data
Generates the localization data for JavaScript.
public get_data(): array
This method returns an array of text strings that are used in various parts of the frontend, including cart messages, account actions, and error handling. The strings are internationalized and can be filtered using WordPress hooks.
Return Value:
The localization data for JavaScript.
Automatically generated on 2025-01-21