Skip to content

Commit

Permalink
Merge branch 'release/1.8.6' into issue/1571
Browse files Browse the repository at this point in the history
* release/1.8.6:
  Improved payment status language
  Reordered to fix travis error
  Attempting to fix broken PHPunit tests
  Fix: typo in currency section setting
  Fix: generate level class and id with price_id instead of
  fix #1592
  Update README.md
  Update Documentation.
  New POT file for 1.8.5
  Change log updated with completed issues
  New option to toggle billing details and corresponding logic #1573
  Version bumped, change log added - more to add
  Code formatting
  Added exception for offline donations meta_key upgrades #1579
  Ensure upgrade can run on any WP-admin page, don’t rely on give_vars which was throwing a console error and the confirm window would never show #1580
  Updated give_logged_in_only to return enabled if metakey `_give_logged_in_only` returns empty #1578
  Fix typo
  Add comment
  Render continue button title setting field conditionaly in shortcode generator popup
  Show/Hide on continue button title in widget form
  • Loading branch information
Devin Walker committed Mar 29, 2017
2 parents 95b22ac + 1f97637 commit 6866344
Show file tree
Hide file tree
Showing 22 changed files with 430 additions and 323 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ matrix:
before_script:
- bash tests/bin/install.sh wordpress_test root '' localhost $WP_VERSION
- bash tests/bin/travis.sh before
- composer install

script: phpunit -c phpunit.xml

Expand Down
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,25 @@ We know how important fundraising online is to accomplish your goals. For many n

### Why Give? ###

Prior to Give there was no single go-to solution for accepting donations on WordPress. Sure, Gravity Forms and WooCommerce are great plugins but they're not developed to work specifically for donations. This can often lead to your users being confused by unnecessary cart systems, incorrect terminology, or lack of flexibility. As an admin, you may have wrestled with the various other WordPress donation plugins. Dealing with the lack of documentation and unreliable support can be an all too common occurrence and a real pain.
Before Give there was no single go-to solution for accepting donations on WordPress. Sure, Gravity Forms and WooCommerce are great plugins, but they're not developed to work specifically for donations. This can often lead to your users being confused by unnecessary cart systems, incorrect terminology, or lack of flexibility. As an admin, you may have wrestled with the various other WordPress donation plugins. Dealing with the lack of documentation and unreliable support can be an all too common occurrence and a real pain.

There's a better way. Now you have Give.

### Simple and Pain Free Giving ###
### Simple and Pain-Free Giving ###

Give works great right in WordPress in a way that you're already familiar in working. Simply install and activate the plugin to get started. The backbone of Give lies within its forms. Forms are what allow you to accept donations anywhere on your website. When creating a form you may specify whether the form is a single or multi-level amount. As well, forms can accept a user provided donation amount.
Give works great right in WordPress in a way that you're already familiar with working. Simply install and activate the plugin to get started. The backbone of Give lies within its forms. Forms are what allow you to accept donations anywhere on your website. When creating a form, you may specify whether the form is a single or multi-level amount. As well, forms can accept a user provided donation amount.

### First Time Users ###

For new users, we suggest reviewing our [documentation](https://givewp.com/documentation "Visit the Give docs") to get an understanding of how the plugin works prior to using it. If you run into any trouble, [support](https://givewp.com/support "Visit the Give support page") is here to help you with your issues, questions, and concerns.
For new users, we suggest reviewing our [documentation](https://givewp.com/documentation "Visit the Give docs") to get an understanding of how the plugin works before using it. If you run into any trouble, [support](https://givewp.com/support "Visit the Give support page") is here to help you with your issues, questions, and concerns.

### Zero Commission Charges ###

We earn money by selling add-ons, not from the money you raise. What you raise is yours to keep to support your cause. Period. Add-ons are premium features that enable you to extend the functionality of Give. For example, you can use one of our add-ons to accept funds through your favorite payment gateway.

### Easy to Customize and Enhance ###

Give is built by [WordImpress](https://wordimpress.com "Visit the the developers of Give - WordImpress"), our plugins are built from the ground up to be intuitive and easy to use. Along with the plugin is a support team that is dedicated, fast to respond, and always willing to squash bugs and help troubleshoot.
Give is built by [WordImpress](https://wordimpress.com "Visit the the developers of Give - WordImpress"), our plugins are built from the ground up to be intuitive and easy to use. Along with the plugin is a support team that is dedicated, fast to respond, and always willing to squash bugs and helps troubleshoot.

### Connect with Give ###

Expand Down Expand Up @@ -55,15 +55,15 @@ The easiest way to install the plugin is through the [WordPress.org plugin repos

Automatic installation is the easiest option as WordPress handles the file transfers itself and you don't need to leave your web browser. To do an automatic install of Give, log in to your WordPress dashboard, navigate to the Plugins menu and click "Add New".

In the search field type "Give" and click Search Plugins. Once you have found the plugin you can view details about it such as the the point release, rating and description, as well as install it by simply clicking "Install Now".
In the search field type "Give" and click Search Plugins. Once you have found the plugin you can view details about it such as the point release, rating, and description, as well as install it by simply clicking "Install Now".

### Manual installation ###

The manual installation method involves downloading the plugin and uploading it to your server via your favorite FTP application. The WordPress Codex contains [instructions on how to do this here](https://codex.wordpress.org/Managing_Plugins#Manual_Plugin_Installation).

### Updating ###

Automatic updates should work like a charm; as always though, ensure you backup your site just in case.
Automatic updates should work like a charm; as always, though, ensure you backup your site just in case.

## Frequently Asked Questions ##

Expand All @@ -81,8 +81,8 @@ Yes! We call them "Give Stories". [You can read them all here](https://givewp.co

### How is Give better than *Gravity Forms* for accepting donations through WordPress? ###

First off, we love Gravity Forms. It's a great plugin and has a lot of good features for accepting donations. That being said, it lacks substantial reporting features many nonprofits find crucial to cause. In addition, there's a larger barrier to entry than Give. It's a premium only plugin and requires a developer license ($199/yr) to accept credit card and recurring payments on site.
First off, we love Gravity Forms. It's a great plugin and has a lot of good features for accepting donations. That being said, it lacks substantial reporting features many nonprofits find crucial to the cause. In addition, there's a larger barrier to entry than Give. It's a premium only plugin and requires a developer license ($199/yr) to accept credit card and recurring payments on site.

### How is Give better than *WooCommerce* for accepting donations on WordPress? ###

It's true. We also really like WooCommerce. It's hands-down the most robust eCommerce platform for WordPress. But that's also the issue. When accepting donations you don't need a cart system, shipping, or tax calculations. Additionally, customizing the plugin functionality and terminology for nonprofit needs is often a daunting task. You never want your users to receive an "invoice" for the donation as a "product" they "purchased." Rather, you'd like for them to receive a tax deductible receipt for the donation they gave. WooCommerce *can* do donations, but it was not designed for it. Nor is it very easy to setup and maintain across the various major version releases.
It's true. We also really like WooCommerce. It's hands-down the most robust eCommerce platform for WordPress. But that's also the issue. When accepting donations, you don't need a cart system, shipping, or tax calculations. Additionally, customizing the plugin functionality and terminology for nonprofit needs is often a daunting task. You never want your users to receive an "invoice" for the donation as a "product" they "purchased". Rather, you'd like for them to receive a tax deductible receipt for the donation they gave. WooCommerce *can* make donations, but it was not designed for it. Nor is it very easy to setup and maintain across the various major version releases.
7 changes: 4 additions & 3 deletions assets/js/admin/admin-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -1360,9 +1360,10 @@ jQuery.noConflict();

// Get max level id.
$('input[type="hidden"].give-levels_id', $this).each(function (index, item) {
var $item = $(item);
if (max_level_id < $item.val()) {
max_level_id = $item.val();
var $item = $(item),
current_level = parseInt( $item.val() );
if (max_level_id < current_level ) {
max_level_id = current_level;
}
});

Expand Down
2 changes: 1 addition & 1 deletion assets/js/admin/admin-scripts.min.js

Large diffs are not rendered by default.

28 changes: 28 additions & 0 deletions assets/js/admin/admin-shortcodes.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,20 @@ var jq = jQuery.noConflict();

var scShortcode, scButton;

/**
* Show continue button title setting field only if display style is not All Fields.
*/
var render_continue_button_title_field = function() {
var selected_display_style = jq('.mce-txt', '.mce-give-display-style').text(),
expected_display_styles = [ '- Select -', 'All Fields' ];

if( -1 !== jq.inArray( selected_display_style, expected_display_styles ) ) {
jq('.mce-give-continue-button-title').closest('.mce-container' ).hide()
} else {
jq('.mce-give-continue-button-title').closest('.mce-container' ).show()
}
};

var scForm = {

open: function( editor_id ) {
Expand Down Expand Up @@ -48,6 +62,18 @@ var scForm = {
return;
}

/**
* Render continue button title setting field on basis of display style value.
*/
jq.each( response.body, function( index, item ){

if( 'display_style' === item.name ) {
response.body[index].onselect = function(){
render_continue_button_title_field();
};
}
});

var popup = {
title : response.title,
body : response.body,
Expand Down Expand Up @@ -109,6 +135,8 @@ var scForm = {
onopen: function() {
// Conditional fields.
console.log( response );

render_continue_button_title_field();
}
};

Expand Down
2 changes: 1 addition & 1 deletion assets/js/admin/admin-shortcodes.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 21 additions & 1 deletion assets/js/admin/admin-widgets.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,37 @@ jQuery.noConflict();
} )
};

/**
* Show/Hide continue button tile setting on basis of display setting for Give Form widget.
*/
var continue_button_setting_js = function() {
$( '.widget-liquid-right' ).on( 'change', '.give_forms_display_style_setting_row input', function(){
var $parent = $(this).parents('p'),
$continue_button_title = $parent.next();

if( 'onpage' === $('input:checked', $parent ).val() ) {
$continue_button_title.hide();
} else {
$continue_button_title.show();
}
});
};


//On DOM Ready
$( function () {

initialize_qtips();

continue_button_setting_js();
$( '.give_forms_display_style_setting_row input', '.widget-liquid-right' ).trigger('change');
} );

//Function to Refresh jQuery toggles for Yelp Widget Pro upon saving specific widget
$( document ).ajaxSuccess( function ( e, xhr, settings ) {
initialize_qtips();

continue_button_setting_js();
$( '.give_forms_display_style_setting_row input', '.widget-liquid-right' ).trigger('change');
} );


Expand Down
2 changes: 1 addition & 1 deletion assets/js/admin/admin-widgets.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions give.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Description: The most robust, flexible, and intuitive way to accept donations on WordPress.
* Author: WordImpress
* Author URI: https://wordimpress.com
* Version: 1.8.4
* Version: 1.8.5
* Text Domain: give
* Domain Path: /languages
* GitHub Plugin URI: https://github.com/WordImpress/Give
Expand Down Expand Up @@ -260,7 +260,7 @@ private function setup_constants() {

// Plugin version
if ( ! defined( 'GIVE_VERSION' ) ) {
define( 'GIVE_VERSION', '1.8.4' );
define( 'GIVE_VERSION', '1.8.5' );
}

// Plugin Folder Path
Expand Down
11 changes: 11 additions & 0 deletions includes/admin/settings/class-settings-gateways.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,17 @@ public function get_settings() {
),
'default' => 'donation',
),
array(
'name' => __( 'Billing Details', 'give' ),
'desc' => __( 'This option will enable the billing details section for PayPal Standard which requires the donor\'s address to complete the donation. These fields are not required by PayPal to process the transaction, but you may have a need to collect the data.', 'give' ),
'id' => 'paypal_standard_billing_details',
'type' => 'radio_inline',
'default' => 'disabled',
'options' => array(
'enabled' => __( 'Enabled', 'give' ),
'disabled' => __( 'Disabled', 'give' ),
)
),
array(
'name' => __( 'PayPal IPN Verification', 'give' ),
'desc' => __( 'If donations are not getting marked as complete, use a slightly less secure method of verifying donations.', 'give' ),
Expand Down
2 changes: 1 addition & 1 deletion includes/admin/settings/class-settings-general.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ public function get_settings() {
'type' => 'give_docs_link',
),
array(
'type' => 'title',
'type' => 'sectionend',
'id' => 'give_title_general_settings_2'
)
);
Expand Down
2 changes: 2 additions & 0 deletions includes/admin/shortcodes/abstract-shortcode-generator.php
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@ protected function generate_listbox( $field ) {
'tooltip' => '',
'type' => '',
'value' => '',
'classes' => ''
), $field );

if ( $this->validate( $field ) ) {
Expand Down Expand Up @@ -328,6 +329,7 @@ protected function generate_textbox( $field ) {
'tooltip' => '',
'type' => '',
'value' => '',
'classes' => ''
), $field );

if ( $this->validate( $field ) ) {
Expand Down
3 changes: 2 additions & 1 deletion includes/admin/shortcodes/shortcode-give-form.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ public function define_fields() {
array(
'type' => 'listbox',
'name' => 'display_style',
'classes' => 'give-display-style',
'label' => esc_attr__( 'Display Options', 'give' ),
'tooltip' => esc_attr__( 'How would you like to display donation information?', 'give' ),
'options' => array(
Expand All @@ -107,7 +108,7 @@ public function define_fields() {
),
array(
'type' => 'textbox',
'classes' => 'give-hidden',
'classes' => 'give-hidden give-continue-button-title',
'name' => 'continue_button_title',
'label' => esc_attr__( 'Button Text', 'give' ),
'tooltip' => esc_attr__( 'The button label for displaying the additional payment fields.', 'give' ),
Expand Down
Loading

0 comments on commit 6866344

Please sign in to comment.