Skip to content

Commit

Permalink
Updates to 5.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Gravity Forms committed Jun 18, 2024
1 parent 02abe99 commit 05f64b7
Show file tree
Hide file tree
Showing 17 changed files with 495 additions and 358 deletions.
2 changes: 1 addition & 1 deletion assets/css/dist/admin.css

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

8 changes: 3 additions & 5 deletions assets/css/dist/theme-foundation.css

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

2 changes: 1 addition & 1 deletion assets/css/dist/theme-framework.css

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

2 changes: 1 addition & 1 deletion assets/css/dist/theme.css

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

2 changes: 1 addition & 1 deletion assets/css/dist/theme.min.css

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

3 changes: 3 additions & 0 deletions change_log.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
### 5.7.0 | 2024-06-17
- Fixed a typo that can cause a fatal error when using the gform_stripe_payment_element_authorization_only filter.

### 5.6.0 | 2024-04-29
- Added a new [`gform_stripe_payment_element_updated_payment_information`](https://docs.gravityforms.com/gform_stripe_payment_element_updated_payment_information/) JavaScript filter to allow modifying the payment element payment information when the form total changes.
- Updated logging to decrease the log file size and make it easier to track issues.
Expand Down
40 changes: 23 additions & 17 deletions class-gf-stripe.php
Original file line number Diff line number Diff line change
Expand Up @@ -327,12 +327,15 @@ public function pre_init() {
* @return array The scripts to be enqueued.
*/
public function scripts() {
$min = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG || isset( $_GET['gform_debug'] ) ? '' : '.min';
$base_url = $this->get_base_url();
$version = $this->_version;
$min = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG || isset( $_GET['gform_debug'] ) ? '' : '.min';

$scripts = array(
array(
'handle' => 'stripe.js',
'src' => 'https://js.stripe.com/v2/',
'version' => $this->_version,
'version' => $version,
'deps' => array(),
'in_footer' => false,
'enqueue' => array(
Expand All @@ -342,7 +345,7 @@ public function scripts() {
array(
'handle' => 'stripe_v3',
'src' => 'https://js.stripe.com/v3/',
'version' => $this->_version,
'version' => $version,
'deps' => array(),
'in_footer' => false,
'enqueue' => array(
Expand All @@ -351,8 +354,8 @@ public function scripts() {
),
array(
'handle' => 'gforms_stripe_frontend',
'src' => $this->get_base_url() . "/js/frontend{$min}.js",
'version' => $this->_version,
'src' => $base_url . "/js/frontend{$min}.js",
'version' => $version,
'deps' => array( 'jquery', 'gform_json', 'gform_gravityforms', 'wp-a11y' ),
'in_footer' => false,
'enqueue' => array(
Expand Down Expand Up @@ -381,8 +384,8 @@ public function scripts() {
),
array(
'handle' => 'gforms_stripe_admin',
'src' => $this->get_base_url() . "/js/admin{$min}.js",
'version' => $this->_version,
'src' => $base_url . "/js/admin{$min}.js",
'version' => $version,
'deps' => array( 'jquery', 'thickbox', 'stripe.js', 'wp-a11y' ),
'in_footer' => false,
'enqueue' => array(
Expand Down Expand Up @@ -417,8 +420,8 @@ public function scripts() {
),
array(
'handle' => 'gform_stripe_payment_element_form_editor',
'src' => $this->get_base_url() . "/js/payment_element_form_editor{$min}.js",
'version' => $this->_version,
'src' => $base_url . "/js/payment_element_form_editor{$min}.js",
'version' => $version,
'deps' => array( 'jquery', 'stripe_v3' ),
'in_footer' => false,
'enqueue' => array(
Expand Down Expand Up @@ -454,22 +457,24 @@ public function scripts() {
* @return array Returns an array of styles and when to enqueue them
*/
public function styles() {
$min = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG || isset( $_GET['gform_debug'] ) ? '' : '.min';
$base_url = $this->get_base_url();
$version = $this->_version;
$min = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG || isset( $_GET['gform_debug'] ) ? '' : '.min';

$styles = array(
array(
'handle' => 'gforms_stripe_frontend',
'src' => $this->get_base_url() . "/assets/css/dist/theme{$min}.css",
'version' => $this->_version,
'src' => $base_url . "/assets/css/dist/theme{$min}.css",
'version' => $version,
'in_footer' => false,
'enqueue' => array(
array( $this, 'frontend_style_callback' ),
),
),
array(
'handle' => 'gform_stripe_pluginsettings',
'src' => $this->get_base_url() . "/assets/css/dist/admin{$min}.css",
'version' => $this->_version,
'src' => $base_url . "/assets/css/dist/admin{$min}.css",
'version' => $version,
'deps' => array( 'thickbox' ),
'enqueue' => array(
array(
Expand Down Expand Up @@ -504,13 +509,14 @@ public function theme_layer_styles( $form, $ajax, $settings, $block_settings = a
}

$base_url = plugins_url( '', __FILE__ );
$min = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG || isset( $_GET['gform_debug'] ) ? '' : '.min';

return array(
'foundation' => array(
array( 'gravity_forms_stripe_theme_foundation', "$base_url/assets/css/dist/theme-foundation.css" ),
array( 'gravity_forms_stripe_theme_foundation', $base_url . "/assets/css/dist/theme-foundation{$min}.css" ),
),
'framework' => array(
array( 'gravity_forms_stripe_theme_framework', "$base_url/assets/css/dist/theme-framework.css" ),
array( 'gravity_forms_stripe_theme_framework', $base_url . "/assets/css/dist/theme-framework{$min}.css" ),
),
);
}
Expand Down Expand Up @@ -7199,7 +7205,7 @@ public function get_payment_element_capture_method( $form, $feed ) {
$authorization_only = apply_filters( 'gform_stripe_payment_element_authorization_only', false, $form, $feed );

if ( $authorization_only ) {
$this->log_debug( __METHOD__ . '(): The gform_stripe_payment_element_authorization_only filter was used to prevent capture tracking id:' . md5( rggpost( 'state_' . rgar( $form, 'id' ) ) ) );
$this->log_debug( __METHOD__ . '(): The gform_stripe_payment_element_authorization_only filter was used to prevent capture tracking id:' . md5( rgpost( 'state_' . rgar( $form, 'id' ) ) ) );

return 'manual';
}
Expand Down
9 changes: 0 additions & 9 deletions custom.cnf

This file was deleted.

Loading

0 comments on commit 05f64b7

Please sign in to comment.