Skip to content

Commit

Permalink
convert tabs to spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
0xNe0x1 committed Oct 16, 2024
1 parent 7bfb95c commit d72a93d
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 54 deletions.
78 changes: 39 additions & 39 deletions includes/class-depay-wc-payments-block-worldchain.php
Original file line number Diff line number Diff line change
@@ -1,50 +1,50 @@
<?php

if ( ! defined( 'ABSPATH' ) ) {
exit;
exit;
}

use Automattic\WooCommerce\Blocks\Payments\Integrations\AbstractPaymentMethodType;
use Automattic\WooCommerce\Blocks\Payments\PaymentMethodTypeInterface;

final class DePay_WC_Payments_Block_Worldchain extends AbstractPaymentMethodType {

private $gateway;

public $name = DePay_WC_Payments_Worldchain_Gateway::GATEWAY_ID;

public function initialize() {
$this->gateway = new DePay_WC_Payments_Worldchain_Gateway();
$this->settings = array(
'blockchains' => '["worldchain"]'
);
}

public function is_active() {
return $this->gateway->is_available();
}

public function get_payment_method_script_handles() {

wp_register_script(
'DEPAY_WC_BLOCKS_INTEGRATION',
plugins_url( 'dist/block.js', DEPAY_WC_PLUGIN_FILE ),
array( 'wc-blocks-registry', 'wc-settings', 'wp-element' ),
DEPAY_CURRENT_VERSION,
true
);

return [ 'DEPAY_WC_BLOCKS_INTEGRATION' ];
}

public function get_payment_method_data() {
return array(
'id' => $this->gateway->id,
'title' => $this->gateway->title,
'description' => $this->gateway->description,
'enabled' => $this->gateway->is_available(),
'blockchains' => ['worldchain'],
'pluginUrl' => plugin_dir_url( __FILE__ ),
);
}
private $gateway;

public $name = DePay_WC_Payments_Worldchain_Gateway::GATEWAY_ID;

public function initialize() {
$this->gateway = new DePay_WC_Payments_Worldchain_Gateway();
$this->settings = array(
'blockchains' => '["worldchain"]'
);
}

public function is_active() {
return $this->gateway->is_available();
}

public function get_payment_method_script_handles() {

wp_register_script(
'DEPAY_WC_BLOCKS_INTEGRATION',
plugins_url( 'dist/block.js', DEPAY_WC_PLUGIN_FILE ),
array( 'wc-blocks-registry', 'wc-settings', 'wp-element' ),
DEPAY_CURRENT_VERSION,
true
);

return [ 'DEPAY_WC_BLOCKS_INTEGRATION' ];
}

public function get_payment_method_data() {
return array(
'id' => $this->gateway->id,
'title' => $this->gateway->title,
'description' => $this->gateway->description,
'enabled' => $this->gateway->is_available(),
'blockchains' => ['worldchain'],
'pluginUrl' => plugin_dir_url( __FILE__ ),
);
}
}
30 changes: 15 additions & 15 deletions includes/class-depay-wc-payments-gateway-worldchain.php
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
exit;
}

class DePay_WC_Payments_Worldchain_Gateway extends DePay_WC_Payments_Gateway {

const GATEWAY_ID = 'depay_wc_payments_worldchain';
const GATEWAY_ID = 'depay_wc_payments_worldchain';

public function __construct() {
$this->id = static::GATEWAY_ID;
$this->method_title = 'World Chain';
$this->method_description = 'Payments on World Chain.';
$this->supports = [ 'products' ];
$this->init_form_fields();
$this->init_settings();
$title = 'World Chain';
$this->title = $title;
$description = get_option( 'depay_wc_checkout_description_worldchain' );
$this->description = empty($description) ? null : $description;
$this->blockchain = 'worldchain';
}
public function __construct() {
$this->id = static::GATEWAY_ID;
$this->method_title = 'World Chain';
$this->method_description = 'Payments on World Chain.';
$this->supports = [ 'products' ];
$this->init_form_fields();
$this->init_settings();
$title = 'World Chain';
$this->title = $title;
$description = get_option( 'depay_wc_checkout_description_worldchain' );
$this->description = empty($description) ? null : $description;
$this->blockchain = 'worldchain';
}
}

0 comments on commit d72a93d

Please sign in to comment.