Feature: Allow Shortcode Att for T&C Display
-
Dear Nicolas,
just starting to use your plugin, great work – thank you! As I am figuring out your hooks, there is one thing I do not manage to do yet.
I would like to dynamically create the button parameters via general shortcode attributes instead via the value=”…” attribute. For most parameters that works fine, but not for the attribute tc=”…” which I would like to use to have the terms&conditions checkbox display. That means I would like to use a shortcode att like in [direct-stripe … tc=”1″] to make the terms&conditions checkbox appear.Currently that does not work due to the code in ds-button.php:
//T&C Check box condition if( isset( $ds_button->tc ) && $ds_button->tc === true ||
Unfortunately I cannot pass a shortcode attributes as type boolean, it is always type string. So the comparison $ds_button->tc === true will always fail, if I use a shortcode like [direct-stripe … tc=”1″] . It works without type enforcement, i.e. with $ds_button->tc == true (with only two equal signs).
Would there be any unwanted side effects by changing the code like this? If not, would you be willing to turn the === to == in your code?
Kind regards
Florian
- The topic ‘Feature: Allow Shortcode Att for T&C Display’ is closed to new replies.