Merge branch 'theme-fix' into anon-users
This commit is contained in:
commit
c80a003922
|
@ -2,14 +2,13 @@
|
||||||
|
|
||||||
[![Build Status](https://travis-ci.org/choiceaustralia/discourse-donations.svg?branch=master)](https://travis-ci.org/choiceaustralia/discourse-donations)
|
[![Build Status](https://travis-ci.org/choiceaustralia/discourse-donations.svg?branch=master)](https://travis-ci.org/choiceaustralia/discourse-donations)
|
||||||
|
|
||||||
Accept donations in Discourse! Integrates with [Stripe](https://stripe.com).
|
Accept donations in Discourse! Integrates with [Stripe](https://stripe.com).
|
||||||
|
|
||||||
Note: Stripe requires HTTPS.
|
Note: Stripe requires HTTPS.
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
* Follow the install instructions here: https://meta.discourse.org/t/install-a-plugin/19157
|
* Follow the install instructions here: https://meta.discourse.org/t/install-a-plugin/19157
|
||||||
* Set the private and public keys in the plugin settings.
|
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# name: discourse-donations
|
# name: discourse-donations
|
||||||
# about: Integrating Discourse with Stripe for donations
|
# about: Integrating Discourse with Stripe for donations
|
||||||
# version: 1.9.1
|
# version: 1.9.2
|
||||||
# url: https://github.com/choiceaustralia/discourse-donations
|
# url: https://github.com/choiceaustralia/discourse-donations
|
||||||
# authors: Rimian Perkins
|
# authors: Rimian Perkins
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ after_initialize do
|
||||||
# Must be placed on every page for fraud protection.
|
# Must be placed on every page for fraud protection.
|
||||||
header_script = '<script src="https://js.stripe.com/v3/"></script>'
|
header_script = '<script src="https://js.stripe.com/v3/"></script>'
|
||||||
discourse_donations_theme = Theme.find_or_create_by(name: 'Discourse Donations Header', hidden: false, user_id: -1)
|
discourse_donations_theme = Theme.find_or_create_by(name: 'Discourse Donations Header', hidden: false, user_id: -1)
|
||||||
discourse_donations_theme.set_field('common', 'head_tag', header_script)
|
discourse_donations_theme.set_field(target: 'common', name: 'head_tag', value: header_script)
|
||||||
discourse_donations_theme.save
|
discourse_donations_theme.save
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue