Skip to content

Commit

Permalink
Fix styling
Browse files Browse the repository at this point in the history
  • Loading branch information
larasmorningtrain authored and github-actions[bot] committed Jan 17, 2024
1 parent 35adeba commit ee7f3aa
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions src/woocommerce/WC_Gateway_Economic_Invoice.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public function __construct()
$this->description = $this->get_option('description');

// This action hook saves the settings
add_action('woocommerce_update_options_payment_gateways_' . $this->id, [$this, 'process_admin_options']);
add_action('woocommerce_update_options_payment_gateways_'.$this->id, [$this, 'process_admin_options']);

add_action('woocommerce_new_order', [$this, 'onNewOrder'], 10, 1);
add_action('woocommerce_order_status_completed', [$this, 'onOrderCompleted'], 10, 1);
Expand Down Expand Up @@ -194,7 +194,7 @@ public function onOrderCompleted(int $orderId): void

private function getLayouts(): array
{
if(! $this->isSettingsPage()){
if (! $this->isSettingsPage()) {
return [];
}

Expand All @@ -205,7 +205,7 @@ private function getLayouts(): array

private function getPaymentTerms()
{
if(! $this->isSettingsPage()){
if (! $this->isSettingsPage()) {
return [];
}

Expand All @@ -216,7 +216,7 @@ private function getPaymentTerms()

private function getVatZones()
{
if(! $this->isSettingsPage()){
if (! $this->isSettingsPage()) {
return [];
}

Expand All @@ -227,7 +227,7 @@ private function getVatZones()

private function getCustomerGroup()
{
if(! $this->isSettingsPage()){
if (! $this->isSettingsPage()) {
return [];
}

Expand Down Expand Up @@ -274,16 +274,15 @@ public function eanFieldUpdateOrderMeta($order_id): void

public function addEanFieldFisplayAdminOrderMeta($order): void
{
echo '<p><strong>' . __('EAN nummer', 'woocommerce') . ':</strong> ' . get_post_meta($order->get_id(), 'economic_billing_ean', true) . '</p>';
echo '<p><strong>'.__('EAN nummer', 'woocommerce').':</strong> '.get_post_meta($order->get_id(), 'economic_billing_ean', true).'</p>';
}

function isSettingsPage() {
public function isSettingsPage()
{
$currentScreen = get_current_screen();

return $currentScreen->base === 'woocommerce_page_wc-settings' &&
isset($_GET['tab']) && $_GET['tab'] === 'checkout' &&
isset($_GET['section']) && $_GET['section'] === 'economic_invoice';
}


}

0 comments on commit ee7f3aa

Please sign in to comment.