💰
elementor pay addons
  • 👋Welcome to Elementor Pay Addons
  • Getting started
    • âš ī¸Prerequisites
    • đŸ’ģInstallation
    • âš™ī¸Settings
    • â„šī¸Webhook Configuration
  • Elements
    • 🛴Checkout Button
    • ✅Confirmation Summary
    • 🚲Price Table Checkout
    • đŸī¸Checkout Credit Card Form (Pro)
    • đŸŽī¸Checkout Element Form (Pro)
    • 🚀Checkout Redirect Form (Pro)
  • FEATURES
    • Email Configuration
    • Decimal Form Field (Pro)
  • Customize confirmation page (Pro)
  • Developer APIs
  • Dynamic Tag PHP
  • Dynamic field by request parameter
Powered by GitBook
On this page
  • Inserting a PHP Dynamic Tag in Payment Fields
  • Testing Your Dynamic Tag

Dynamic Tag PHP

When pricing or quantity requires complex calculations, our Dynamic Tag feature lets you run PHP code directly within payment fields.

PreviousDeveloper APIsNextDynamic field by request parameter

Last updated 1 month ago

This feature requires the Elementor Pro license

Inserting a PHP Dynamic Tag in Payment Fields

Follow these steps to implement a dynamic PHP tag in your payment form:

  1. Create an Elementor form and add your desired payment field (such as credit card).

  1. In the "Actions After Submit" list, add "Credit Card Submission". This will display the Credit Card Submission tab where all your payment settings are located.

  2. Click on the Amount field's dynamic tag button, then scroll down the list of available tags until you find "Code(php)" in the Elementor Stripe Addons category.

  1. Click the gear (settings) button to write your PHP code. Ensure that your code returns a numeric value representing the final quantity. For example:

return 2*5;

Testing Your Dynamic Tag

With the configuration shown above, you can see how dynamic values affect your payment processing:

  • The amount is fixed at â‚Ŧ19.90

  • The quantity is dynamically calculated by our PHP code, which returns a value of 10

  • Therefore, the total price charged would be â‚Ŧ199.00 (â‚Ŧ19.90 × 10)

This feature gives you powerful flexibility when dealing with complex pricing scenarios in your Elementor forms.