Skip to content

Commit a662985

Browse files
authored
Merge pull request #346 from Ultimate-Multisite/reg
Enhancements
2 parents 30475e4 + 67dbf71 commit a662985

62 files changed

Lines changed: 2384 additions & 529 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ jobs:
7171
run: |
7272
rm -rf /tmp/wordpress-tests-lib /tmp/wordpress/
7373
bash bin/install-wp-tests.sh wordpress_test root root mysql latest
74+
ln -s "$GITHUB_WORKSPACE" /tmp/wordpress/wp-content/plugins/ultimate-multisite
7475
7576
- name: Run PHPUnit Tests
7677
if: matrix.php-version != '8.3'

.phpcs.xml.dist

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@
99
<exclude-pattern>/dependencies/</exclude-pattern>
1010
<exclude-pattern>/../wordpress/</exclude-pattern>
1111

12+
<!-- Test files use PHPUnit naming conventions (PascalCase), not WordPress file naming. -->
13+
<rule ref="WordPress.Files.FileName">
14+
<exclude-pattern>/tests/</exclude-pattern>
15+
</rule>
16+
1217
<!-- How to scan -->
1318
<!-- Usage instructions: https://github.com/squizlabs/PHP_CodeSniffer/wiki/Usage -->
1419
<!-- Annotated ruleset: https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-ruleset.xml -->

.wiki/how-can-i-cancel-my-subscription.md

Lines changed: 0 additions & 29 deletions
This file was deleted.

assets/js/checkout.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -786,6 +786,13 @@
786786

787787
} // end if;
788788

789+
// If the strength meter element doesn't exist, skip validation
790+
if (! jQuery('#pass-strength-result').length) {
791+
792+
return;
793+
794+
} // end if;
795+
789796
// Use the shared WU_PasswordStrength utility
790797
if (typeof window.WU_PasswordStrength !== 'undefined') {
791798

assets/js/checkout.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/js/integration-test.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
mounted: function() {
1111
var that = this;
1212
this.loading = true;
13-
13+
1414
setTimeout(() => {
1515
$.ajax({
1616
url: ajaxurl,
@@ -20,14 +20,18 @@
2020
integration: wu_integration_test_data.integration_id,
2121
},
2222
success: function(response) {
23-
console.log(response);
2423
that.loading = false;
2524
that.success = response.success;
2625
that.results = response.data;
26+
},
27+
error: function() {
28+
that.loading = false;
29+
that.success = false;
30+
that.results = wu_integration_test_data.error_message || 'Connection test failed. Please try again.';
2731
}
2832
});
2933
}, 1000);
3034
},
3135
});
3236
});
33-
})(jQuery);
37+
})(jQuery);

assets/js/integration-test.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

composer.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,9 @@
161161
],
162162
"jasny/sso": [
163163
"patches/jasny-sso-src-broker-cookies-php.patch"
164+
],
165+
"mpdf/psr-log-aware-trait": [
166+
"patches/mpdf-psr-log-aware-trait-void-return.patch"
164167
]
165168
},
166169
"installer-paths": {

composer.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

inc/admin-pages/class-customer-edit-admin-page.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1159,10 +1159,10 @@ public function has_title(): bool {
11591159
/**
11601160
* Should implement the processes necessary to save the changes made to the object.
11611161
*
1162-
* @return void
1162+
* @return bool
11631163
* @since 2.0.0
11641164
*/
1165-
public function handle_save(): void {
1165+
public function handle_save(): bool {
11661166

11671167
// Nonce handled in calling method.
11681168
// phpcs:disable WordPress.Security.NonceVerification
@@ -1199,7 +1199,7 @@ public function handle_save(): void {
11991199

12001200
WP_Ultimo()->notices->add($errors, 'error', 'network-admin');
12011201

1202-
return;
1202+
return false;
12031203
}
12041204

12051205
$object->set_billing_address($billing_address);
@@ -1245,7 +1245,7 @@ public function handle_save(): void {
12451245
unset($_POST['new_meta_fields']);
12461246
// phpcs:enable
12471247

1248-
parent::handle_save();
1248+
return parent::handle_save();
12491249
}
12501250

12511251
/**

0 commit comments

Comments
 (0)