Shortcodes
Registers shortcodes for various storefront features.
This class handles:
- Shortcodes for products, cart, checkout, login, registration, account, addresses, orders, etc.
- Dependency injection for shortcode classes.
- WordPress shortcode registration.
- Full name:
\BigCommerce\Container\Shortcodes
- Parent class:
Provider
Constants
Constant | Visibility | Type | Value |
---|---|---|---|
PRODUCTS | public | string | ’shortcode.products’ |
CART | public | string | ’shortcode.cart’ |
CHECKOUT | public | string | ’shortcode.checkout’ |
LOGIN | public | string | ’shortcode.login’ |
REGISTER | public | string | ’shortcode.register’ |
ACCOUNT | public | string | ’shortcode.account’ |
ADDRESS | public | string | ’shortcode.address’ |
ORDERS | public | string | ’shortcode.orders’ |
GIFT_FORM | public | string | ’shortcode.gift_certificate.form’ |
GIFT_BALANCE | public | string | ’shortcode.gift_certificate.balance’ |
PRODUCT_REVIEWS | public | string | ’shortcode.products_reviews’ |
PRODUCT_COMPONENTS | public | string | ’shortcode.products_components’ |
WISHLIST | public | string | ’shortcode.wishlist’ |
Methods
register
Registers all shortcodes into the DI container and attaches WordPress hooks.
public register(\Pimple\Container $container): mixed
Services registered:
- Shortcode classes like
Products
,Cart
,Checkout
, etc.
Hook registered:
after_setup_theme
: Registers WordPress shortcodes.
Parameters:
Parameter | Type | Description |
---|---|---|
$container | \Pimple\Container | The DI container for registering services. |
Automatically generated on 2025-01-21