Skip to content

Commit

Permalink
Fix linter errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardo committed Sep 4, 2024
1 parent 475033f commit b8461c7
Show file tree
Hide file tree
Showing 13 changed files with 475 additions and 475 deletions.
2 changes: 1 addition & 1 deletion multi-currency/src/Compatibility.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class Compatibility extends BaseCompatibility {
*
* @return void
*/
protected function init() {
public function init() {
add_action( 'init', [ $this, 'init_compatibility_classes' ], 11 );

if ( defined( 'DOING_CRON' ) ) {
Expand Down
2 changes: 1 addition & 1 deletion multi-currency/src/Compatibility/BaseCompatibility.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,5 @@ public function __construct( MultiCurrency $multi_currency, Utils $utils ) {
*
* @return void
*/
abstract protected function init();
abstract public function init();
}
2 changes: 1 addition & 1 deletion multi-currency/src/Compatibility/WooCommerceBookings.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public function __construct( MultiCurrency $multi_currency, Utils $utils, Fronte
*
* @return void
*/
protected function init() {
public function init() {
// Add needed actions and filters if Bookings is active.
if ( class_exists( 'WC_Bookings' ) ) {
if ( ! is_admin() || wp_doing_ajax() ) {
Expand Down
2 changes: 1 addition & 1 deletion multi-currency/src/Compatibility/WooCommerceDeposits.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class WooCommerceDeposits extends BaseCompatibility {
*
* @return void
*/
protected function init() {
public function init() {
if ( class_exists( 'WC_Deposits' ) ) {
/*
* Multi-currency support was added to WooCommerce Deposits in version 2.0.1.
Expand Down
2 changes: 1 addition & 1 deletion multi-currency/src/Compatibility/WooCommerceFedEx.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class WooCommerceFedEx extends BaseCompatibility {
*
* @return void
*/
protected function init() {
public function init() {
// Add needed actions and filters if FedEx is active.
if ( class_exists( 'WC_Shipping_Fedex_Init' ) ) {
add_filter( MultiCurrency::FILTER_PREFIX . 'should_return_store_currency', [ $this, 'should_return_store_currency' ] );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class WooCommerceNameYourPrice extends BaseCompatibility {
*
* @return void
*/
protected function init() {
public function init() {
// Add needed actions and filters if Name Your Price is active.
if ( class_exists( 'WC_Name_Your_Price' ) ) {
// Convert meta prices.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class WooCommercePointsAndRewards extends BaseCompatibility {
*
* @return void
*/
protected function init() {
public function init() {
// Add needed filters if Points & Rewards is active and it's not an admin request.
if ( is_admin() || ! class_exists( 'WC_Points_Rewards' ) ) {
return;
Expand Down
2 changes: 1 addition & 1 deletion multi-currency/src/Compatibility/WooCommercePreOrders.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class WooCommercePreOrders extends BaseCompatibility {
*
* @return void
*/
protected function init() {
public function init() {
// Add needed actions and filters if Pre-Orders is active.
if ( class_exists( 'WC_Pre_Orders' ) ) {
add_filter( 'wc_pre_orders_fee', [ $this, 'wc_pre_orders_fee' ] );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class WooCommerceProductAddOns extends BaseCompatibility {
*
* @return void
*/
protected function init() {
public function init() {
// Add needed actions and filters if Product Add Ons is active.
if ( class_exists( 'WC_Product_Addons' ) ) {
if ( ! is_admin() && ! defined( 'DOING_CRON' ) ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class WooCommerceSubscriptions extends BaseCompatibility {
*
* @return void
*/
protected function init() {
public function init() {
// Add needed actions and filters if WC Subscriptions or WCPay Subscriptions are active.
if ( class_exists( 'WC_Subscriptions' ) || class_exists( 'WC_Payments_Subscriptions' ) ) {
if ( ! is_admin() && ! defined( 'DOING_CRON' ) ) {
Expand Down
2 changes: 1 addition & 1 deletion multi-currency/src/Compatibility/WooCommerceUPS.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class WooCommerceUPS extends BaseCompatibility {
*
* @return void
*/
protected function init() {
public function init() {
// Add needed actions and filters if UPS is active.
if ( class_exists( 'WC_Shipping_UPS_Init' ) ) {
add_filter( MultiCurrency::FILTER_PREFIX . 'should_return_store_currency', [ $this, 'should_return_store_currency' ] );
Expand Down
10 changes: 5 additions & 5 deletions multi-currency/src/Logger.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@
*/
class Logger {

/**
* Log source identifier.
*/
const LOG_FILE = 'woopayments-multi-currency';

/**
* The WooCommerce logger instance.
*
* @var \WC_Logger|null
*/
private $logger;

/**
* Log source identifier.
*/
const LOG_FILE = 'woopayments-multi-currency';

/**
* Log a debug message.
*
Expand Down
Loading

0 comments on commit b8461c7

Please sign in to comment.