Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions inc/checkout/signup-fields/class-base-signup-field.php
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,9 @@ public function calculate_style_attr() {
/**
* Sets the config values for the current field.
*
* Note: Return type intentionally omitted to preserve compatibility with
* third-party subclasses that may not declare `: void`.
*
* @since 2.0.0
*
* @param array $attributes Array containing settings for the field.
Expand Down
2 changes: 2 additions & 0 deletions inc/gateways/class-base-gateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -596,6 +596,8 @@ public function supports_payment_polling() {
*/
public function verify_and_complete_payment($payment_id) {

unset($payment_id);

return [
'success' => false,
'status' => 'pending',
Expand Down
2 changes: 2 additions & 0 deletions inc/gateways/class-paypal-gateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -1717,6 +1717,8 @@ public function get_checkout_details($token = '') {
*/
public function get_payment_url_on_gateway($gateway_payment_id) {

unset($gateway_payment_id);

return '';
}

Expand Down
22 changes: 18 additions & 4 deletions inc/integrations/host-providers/class-cloudflare-host-provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -350,21 +350,35 @@ public function on_remove_subdomain($subdomain, $site_id) {
]
);

if ( ! $dns_entries->result) {
if (is_wp_error($dns_entries)) {
wu_log_add(
'integration-cloudflare',
sprintf(
'Failed to look up subdomain "%s" in Cloudflare. Reason: %s',
$original_subdomain,
$dns_entries->get_error_message()
),
LogLevel::ERROR
);

return;
}

if (empty($dns_entries->result)) {
continue;
}

$dns_entry_to_remove = $dns_entries->result[0];

$results = $this->cloudflare_api_call("client/v4/zones/$zone_id/dns_records/$dns_entry_to_remove->id", 'DELETE');

if (is_wp_error($results)) {
wu_log_add('integration-cloudflare', sprintf('Failed to remove subdomain "%s" to Cloudflare. Reason: %s', $subdomain, $results->get_error_message()), LogLevel::ERROR);
wu_log_add('integration-cloudflare', sprintf('Failed to remove subdomain "%s" from Cloudflare. Reason: %s', $original_subdomain, $results->get_error_message()), LogLevel::ERROR);

return;
continue;
}

wu_log_add('integration-cloudflare', sprintf('Removed sub-domain "%s" to Cloudflare.', $subdomain));
wu_log_add('integration-cloudflare', sprintf('Removed sub-domain "%s" from Cloudflare.', $original_subdomain));
}
}

Expand Down
4 changes: 2 additions & 2 deletions inc/ui/class-account-summary-element.php
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ public function defaults() {
* @since 2.0.0
* @return void
*/
public function setup(): void {
public function setup() {

$this->site = WP_Ultimo()->currents->get_site();

Expand Down Expand Up @@ -256,7 +256,7 @@ public function setup(): void {
* @since 2.0.0
* @return void
*/
public function setup_preview(): void {
public function setup_preview() {

$this->site = wu_mock_site();

Expand Down
6 changes: 3 additions & 3 deletions inc/ui/class-billing-info-element.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
* @since 2.0.0
* @return void
*/
public function register_scripts(): void {
public function register_scripts() {

add_wubox();
}
Expand Down Expand Up @@ -231,7 +231,7 @@
* @since 2.0.0
* @return void
*/
public function setup(): void {
public function setup() {

$this->membership = WP_Ultimo()->currents->get_membership();

Expand All @@ -248,7 +248,7 @@
* @since 2.0.0
* @return void
*/
public function setup_preview(): void {
public function setup_preview() {

$this->site = wu_mock_site();

Expand Down Expand Up @@ -289,7 +289,7 @@
]
);

wu_get_template('dashboard-widgets/billing-info', $atts);

Check warning on line 292 in inc/ui/class-billing-info-element.php

View workflow job for this annotation

GitHub Actions / Code Quality Checks

Method WP_Ultimo\UI\Billing_Info_Element::output() should return string but return statement is missing.
}

/**
Expand Down
2 changes: 1 addition & 1 deletion inc/ui/class-checkout-element.php
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ public function is_thank_you_page() {
* @since 2.0.0
* @return void
*/
public function setup(): void {
public function setup() {

if ($this->is_thank_you_page()) {
\WP_Ultimo\UI\Thank_You_Element::get_instance()->setup();
Expand Down
2 changes: 1 addition & 1 deletion inc/ui/class-command-palette-manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class Command_Palette_Manager {
* @since 2.1.0
* @return void
*/
public function init() {
public function init(): void {

add_action('admin_enqueue_scripts', [$this, 'enqueue_scripts'], 100);

Expand Down
6 changes: 3 additions & 3 deletions inc/ui/class-current-membership-element.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public function init() {
* @since 2.0.0
* @return void
*/
public function register_scripts(): void {
public function register_scripts() {

add_wubox();
}
Expand Down Expand Up @@ -259,7 +259,7 @@ public function defaults() {
* @since 2.0.0
* @return void
*/
public function setup(): void {
public function setup() {

$this->membership = WP_Ultimo()->currents->get_membership();

Expand All @@ -278,7 +278,7 @@ public function setup(): void {
* @since 2.0.0
* @return void
*/
public function setup_preview(): void {
public function setup_preview() {

$this->membership = wu_mock_membership();

Expand Down
6 changes: 3 additions & 3 deletions inc/ui/class-current-site-element.php
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ public function defaults() {
* @since 2.0.0
* @return void
*/
public function setup(): void {
public function setup() {

$this->site = WP_Ultimo()->currents->get_site();

Expand All @@ -319,7 +319,7 @@ public function setup(): void {
* @since 2.0.0
* @return void
*/
public function setup_preview(): void {
public function setup_preview() {

$this->site = wu_mock_site();

Expand All @@ -332,7 +332,7 @@ public function setup_preview(): void {
* @since 2.0.0
* @return void
*/
public function register_scripts(): void {
public function register_scripts() {

add_wubox();
}
Expand Down
6 changes: 3 additions & 3 deletions inc/ui/class-domain-mapping-element.php
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ public function init() {
* @since 2.0.0
* @return void
*/
public function register_scripts(): void {
public function register_scripts() {

add_wubox();
}
Expand Down Expand Up @@ -1053,7 +1053,7 @@ public function handle_delete_dns_record(): void {
* @since 2.0.0
* @return void
*/
public function setup(): void {
public function setup() {

$this->site = WP_Ultimo()->currents->get_site();

Expand All @@ -1075,7 +1075,7 @@ public function setup(): void {
* @since 2.0.0
* @return void
*/
public function setup_preview(): void {
public function setup_preview() {

$this->site = wu_mock_site();

Expand Down
6 changes: 3 additions & 3 deletions inc/ui/class-invoices-element.php
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ public function defaults() {
* @since 2.0.0
* @return void
*/
public function register_scripts(): void {
public function register_scripts() {

wp_enqueue_script('wu-ajax-list-table');
}
Expand Down Expand Up @@ -235,7 +235,7 @@ public function dependencies(): void {
* @since 2.0.0
* @return void
*/
public function setup(): void {
public function setup() {

$this->membership = WP_Ultimo()->currents->get_membership();

Expand All @@ -252,7 +252,7 @@ public function setup(): void {
* @since 2.0.0
* @return void
*/
public function setup_preview(): void {
public function setup_preview() {

$this->membership = wu_mock_membership();
}
Expand Down
4 changes: 2 additions & 2 deletions inc/ui/class-limits-element.php
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ public function defaults() {
* @since 2.0.0
* @return void
*/
public function setup(): void {
public function setup() {

$this->site = WP_Ultimo()->currents->get_site();

Expand All @@ -218,7 +218,7 @@ public function setup(): void {
* @since 2.0.0
* @return void
*/
public function setup_preview(): void {
public function setup_preview() {

$this->site = wu_mock_site();
}
Expand Down
6 changes: 3 additions & 3 deletions inc/ui/class-login-form-element.php
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ public function fields() {
* @since 2.0.0
* @return void
*/
public function register_scripts(): void {
public function register_scripts() {

wp_enqueue_style('wu-admin');

Expand Down Expand Up @@ -413,7 +413,7 @@ public function defaults() {
* @since 2.0.0
* @return void
*/
public function setup(): void {
public function setup() {

$this->logged = is_user_logged_in();

Expand Down Expand Up @@ -551,7 +551,7 @@ public function handle_redirect($redirect_to, $requested_redirect_to, $user) {
* @since 2.0.0
* @return void
*/
public function setup_preview(): void {
public function setup_preview() {

$this->logged = false;
}
Expand Down
6 changes: 3 additions & 3 deletions inc/ui/class-magic-link-url-element.php
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ public function fields(): array {
* @since 2.0.0
* @return void
*/
public function register_scripts(): void {
public function register_scripts() {

wp_enqueue_style('wu-admin');
}
Expand Down Expand Up @@ -262,7 +262,7 @@ public function defaults(): array {
* @since 2.0.0
* @return void
*/
public function setup(): void {
public function setup() {
// No setup restrictions - we render for both logged-in and anonymous users.
// Anonymous users get a regular link without the magic token.
}
Expand All @@ -273,7 +273,7 @@ public function setup(): void {
* @since 2.0.0
* @return void
*/
public function setup_preview(): void {
public function setup_preview() {

$this->site = wu_mock_site();
$this->magic_link_url = home_url('?wu_magic_token=preview_token_example');
Expand Down
6 changes: 3 additions & 3 deletions inc/ui/class-my-sites-element.php
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ public function defaults() {
* @since 2.0.0
* @return void
*/
public function register_scripts(): void {
public function register_scripts() {

wp_enqueue_style('wu-admin');
}
Expand All @@ -279,7 +279,7 @@ public function register_scripts(): void {
* @since 2.0.0
* @return void
*/
public function setup(): void {
public function setup() {

global $wpdb;

Expand All @@ -298,7 +298,7 @@ public function setup(): void {
* @since 2.0.0
* @return void
*/
public function setup_preview(): void {
public function setup_preview() {

$this->customer = wu_mock_customer();

Expand Down
4 changes: 2 additions & 2 deletions inc/ui/class-payment-methods-element.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ public function defaults() {
* @since 2.5.0
* @return void
*/
public function setup(): void {
public function setup() {

$this->membership = WP_Ultimo()->currents->get_membership();
$this->customer = WP_Ultimo()->currents->get_customer();
Expand All @@ -170,7 +170,7 @@ public function setup(): void {
* @since 2.5.0
* @return void
*/
public function setup_preview(): void {
public function setup_preview() {

$this->membership = wu_mock_membership();
$this->customer = wu_mock_customer();
Expand Down
2 changes: 1 addition & 1 deletion inc/ui/class-simple-text-element.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ public function fields() {
* @since 2.0.0
* @return void
*/
public function register_scripts(): void {
public function register_scripts() {

wp_enqueue_style('wu-admin');
}
Expand Down
6 changes: 3 additions & 3 deletions inc/ui/class-site-actions-element.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class Site_Actions_Element extends Base_Element {
* @since 2.0.0
* @return void
*/
public function register_scripts(): void {
public function register_scripts() {

add_wubox();
}
Expand Down Expand Up @@ -267,7 +267,7 @@ public function defaults() {
* @since 2.0.0
* @return void
*/
public function setup(): void {
public function setup() {

$this->site = WP_Ultimo()->currents->get_site();

Expand All @@ -290,7 +290,7 @@ public function setup(): void {
* @since 2.0.0
* @return void
*/
public function setup_preview(): void {
public function setup_preview() {

$this->site = wu_mock_site();

Expand Down
Loading
Loading