Skip to content

Commit

Permalink
πŸ› Check if admin and if function exists
Browse files Browse the repository at this point in the history
  • Loading branch information
larasmorningtrain committed Jan 17, 2024
1 parent ee7f3aa commit dbc9490
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/woocommerce/WC_Gateway_Economic_Invoice.php
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,10 @@ public function addEanFieldFisplayAdminOrderMeta($order): void

public function isSettingsPage()
{
if(! is_admin() || ! function_exists('get_current_screen')){
return false;
}

$currentScreen = get_current_screen();

return $currentScreen->base === 'woocommerce_page_wc-settings' &&
Expand Down

0 comments on commit dbc9490

Please sign in to comment.