Docschargebeedocs

HomeBillingPaymentsRevRecGrowthReveal
Support

Product Updates


  • Release Notes

Getting Started


  • Overview
  • Chargebee Billing Data Centers
  • Object Relationship Model
  • Understanding Sites
  • Developer Resources
  • Chargebee Tech Glossary
  • Articles and FAQ

Implementing Chargebee


  • Implementation Guide
  • Go-live Checklist
  • Articles and FAQ

AI in Chargebee


  • Chargebee Agents
  • Chargebee Copilot
  • Chargebee MCP Server (Model context protocol)

Product Catalog


  • Product Catalog Overview
  • Coupons
  • Articles and FAQ

Subscriptions


  • Working with Subscriptions
  • Billing
  • Orders
  • Articles and FAQ

Customers


  • Managing Customers
  • Account Hierarchy
  • Email Notifications
  • Branding
  • Configure Multiple Languages
  • Articles and FAQ

Invoices, Credit Notes and Quotes


  • Invoices
  • Credit Notes
  • Quotes [Legacy]
  • Transactions
  • Articles and FAQ

Taxes


  • Overview
  • Configuring Taxes
  • Country-specific Taxes
  • Articles and FAQ

Hosted Capabilities


  • Overview
  • Hosted Checkout
  • Hosted Self-Serve Portal
  • Hosted Pages Features
  • Additional Hosted Pages
  • Payment Components
  • Managing payments with ChargebeeJS
  • Mobile-Optimized Hosted Pages
  • Articles and FAQ

Site Configuration


  • Users & Roles
  • Custom Fields & Metadata
  • Mandatory Fields
  • File Attachments & Comments
  • Advanced Filter Options
  • Multicurrency Pricing
  • Multi-decimal Support
  • Configuring Reason Codes
  • Events and Webhooks
  • API Keys
  • Time Zone
  • Time Machine
  • Transfer Configurations
  • Articles and FAQ

Reports and Analytics


  • RevenueStory
  • Home Dashboard
  • Frequently Asked Questions
  • FAQs for Classic Reports Sunset
  • Articles and FAQ

Integrations


  • Sales
  • Customer Support and Success
  • Finance
  • Tax
  • Marketing
  • Stitch
  • Collaboration
  • Contract Management
  • Order Management
  • Mobile Subscriptions (Legacy)
  • Other Integrations
  • Articles and FAQ

Data Privacy & Security


  • Two Factor Authentication
  • SAML Single Sign-On
  • System for Cross-Domain Identity Management (SCIM)
  • EU-GDPR
  • Consent Management
  • Personal Data Management
  • Compliance Certificates
  • HIPAA Guidelines
  • PCI Recommendations and Integration Types
  • Articles and FAQ

Data Operations


  • Bulk Operations
  • Migration
  • Articles and FAQ
  1. Billing
  2. Integrations
  3. Articles and FAQ
  4. Wordpress
  1. Billing
  2. Integrations
  3. Articles and FAQ
  4. Wordpress

How to integrate a shortcode in a button in WordPress?

Problem Statement

You want to add Chargebee shortcodes as buttons on your WordPress site. You may also need to know which deprecated shortcodes are still supported.

Solution

Option 1: Use the Checkout Subscription Shortcode in WordPress.

Option 2: Use the drop-in script to load checkout when a button is clicked. The checkout opens on your page when the customer clicks Subscribe.

Shortcodes

Account Portal: [cb_account_portal class="btn"]Account[/cb_account_portal]

Product Subscribe: [cb_product_subscribe_hosted class="btn" product_id="cbdemo_grow"]Subscribe[/cb_product_subscribe_hosted]

Deprecated shortcodes (still supported)

These can be used for restrictions or sign-up flows:

  • cb_login_form
  • cb_registration_form
  • cb_account_link
  • cb_update_payment_method_form
  • cb_product_subscribe

Additional Information

WordPress integration

Related Articles

Why can't I checkout without logging in to the Wordpress site?
How to setup Wordpress plugin?
How does Chargebee Wordpress plugin work?
Wordpress - Chargebee plugin webhook errors list.
How do I lock premium content while using Chargebee's plugin for WordPress?
What is Wordpress plugin? What are the prerequisites for integration?
What are the limitations of Wordpress?
How to setup levels in Wordpress?
How to setup content restrictions in Wordpress?
Plans from Chargebee are not imported in Wordpress, what should I do?

Show more

Was this article helpful?