Dynamic Tag PHP

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

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.

Last updated