Hello @girlcrewhq,
Thank you for using Direct Stripe and for your kind words.
I understand that yu would like to use a Direct Stripe Button with your own styling, is that correct ? If not, could you rephrase the question please ?
The simpler way to customize the Button style is via css, set the Styles parameter not to use custom styles or Stripe styles and apply css to the Button markup (or the ID set in the Button ID option of the button settings page ).
Otherwise I added PHP filters that will be available on the next update that will allow to completely customize the markup.
The version is already available in the Github repo on the Develop Branch, link to download the plugin is https://github.com/New0/direct-stripe/archive/develop.zip
You can replace current version of Direct Stripe with this version and use a custom plugin to set your own markup.
I made a Gist that does what I understood you need at https://gist.github.com/New0/435f41907de2edd1292b1849c7d0456b
So if you want to test the Gist :
– Delete Direct Stripe from your WordPRess installation
– Download the version from the link https://github.com/New0/direct-stripe/archive/develop.zip
– Install and activate it
– Download ZIP of the Gist at https://gist.github.com/New0/435f41907de2edd1292b1849c7d0456b
– Install it as a plugin and activate it
– The code requires to set the button ID ‘MyButtonID’ for the button you want to apply that markup to
– Then don’t forget to set the Styling settings to Do Not set styles
I hope that can help, best wishes,
Nico
Hello @girlcrewhq
I updated the plugin with the hooks that allow changing the button markup. ( As shown in the example at https://gist.github.com/New0/435f41907de2edd1292b1849c7d0456b ).
But if the change are only styling and don’t require to add additionnal tags to the markup, I definitely recommend using CSS.
Let me know if that helped.
Best wishes,
Thanks so much for the detailed response. I saw the plugin was update when i went back to it, so didn’t need to do it via Github download but thanks for that option!
This is a screenshot of the button setting options in the editor we’re using – it does offer option for CSS Class & ID.
In DS Style Settings I have selected Do Not Set Styles
The Button CSS ID in DS BUtton Settings is MyButtonID
But I’m not sure what the Class is – or if I’m even understanding this approach correctly. I feel I may have it back to front!
Hello @girlcrewhq,
I understand that you want to add a button via the page builder and apply Direct Stripe actions to that button, is that correct ?
Does the page builder allow shortcodes or html ? If yes, I think it is the best way to insert a Direct Stripe button, then you can style it using CSS.
Let me know if you need help with shortcode options or styling.
Best wishes,