diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index 1a330de35..1af714cb6 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -28,5 +28,5 @@ jobs: - name: Run test suite run: ./vendor/bin/phpunit - - name: Run Woocommerce coding standards + - name: Run WooCommerce coding standards run: ./vendor/bin/phpcs src modules --extensions=php diff --git a/modules/ppcp-api-client/src/Entity/class-purchaseunit.php b/modules/ppcp-api-client/src/Entity/class-purchaseunit.php index 872ca5013..a05cafb9a 100644 --- a/modules/ppcp-api-client/src/Entity/class-purchaseunit.php +++ b/modules/ppcp-api-client/src/Entity/class-purchaseunit.php @@ -293,8 +293,8 @@ class PurchaseUnit { } /** - * All money values send to PayPal can only have 2 decimal points. Woocommerce internally does - * not have this restriction. Therefore the totals of the cart in Woocommerce and the totals + * All money values send to PayPal can only have 2 decimal points. WooCommerce internally does + * not have this restriction. Therefore the totals of the cart in WooCommerce and the totals * of the rounded money values of the items, we send to PayPal, can differ. In those cases, * we can not send the line items. * diff --git a/modules/ppcp-api-client/src/Factory/class-addressfactory.php b/modules/ppcp-api-client/src/Factory/class-addressfactory.php index 845ed8bad..18cd4623f 100644 --- a/modules/ppcp-api-client/src/Factory/class-addressfactory.php +++ b/modules/ppcp-api-client/src/Factory/class-addressfactory.php @@ -20,7 +20,7 @@ class AddressFactory { /** * Returns either the shipping or billing Address object of a customer. * - * @param \WC_Customer $customer The Woocommerce customer. + * @param \WC_Customer $customer The WooCommerce customer. * @param string $type Either 'shipping' or 'billing'. * * @return Address @@ -43,7 +43,7 @@ class AddressFactory { } /** - * Returns an Address object based of a Woocommerce order. + * Returns an Address object based of a WooCommerce order. * * @param \WC_Order $order The order. * diff --git a/modules/ppcp-api-client/src/Factory/class-amountfactory.php b/modules/ppcp-api-client/src/Factory/class-amountfactory.php index 7d3ff34b5..74725dbce 100644 --- a/modules/ppcp-api-client/src/Factory/class-amountfactory.php +++ b/modules/ppcp-api-client/src/Factory/class-amountfactory.php @@ -38,7 +38,7 @@ class AmountFactory { } /** - * Returns an Amount object based off a Woocommerce cart. + * Returns an Amount object based off a WooCommerce cart. * * @param \WC_Cart $cart The cart. * @@ -84,7 +84,7 @@ class AmountFactory { } /** - * Returns an Amount object based off a Woocommerce order. + * Returns an Amount object based off a WooCommerce order. * * @param \WC_Order $order The order. * diff --git a/modules/ppcp-api-client/src/Factory/class-itemfactory.php b/modules/ppcp-api-client/src/Factory/class-itemfactory.php index 60ae3caaf..fd7e91b4e 100644 --- a/modules/ppcp-api-client/src/Factory/class-itemfactory.php +++ b/modules/ppcp-api-client/src/Factory/class-itemfactory.php @@ -20,7 +20,7 @@ class ItemFactory { /** - * Creates items based off a Woocommerce cart. + * Creates items based off a WooCommerce cart. * * @param \WC_Cart $cart The cart. * @@ -33,7 +33,7 @@ class ItemFactory { $product = $item['data']; /** - * The Woocommerce product. + * The WooCommerce product. * * @var \WC_Product $product */ @@ -60,7 +60,7 @@ class ItemFactory { } /** - * Creates Items based off a Woocommerce order. + * Creates Items based off a WooCommerce order. * * @param \WC_Order $order The order. * @return Item[] @@ -75,10 +75,10 @@ class ItemFactory { } /** - * Creates an Item based off a Woocommerce Order Item. + * Creates an Item based off a WooCommerce Order Item. * - * @param \WC_Order_Item_Product $item The Woocommerce order item. - * @param \WC_Order $order The Woocommerce order. + * @param \WC_Order_Item_Product $item The WooCommerce order item. + * @param \WC_Order $order The WooCommerce order. * * @return Item */ @@ -87,7 +87,7 @@ class ItemFactory { $product = $item->get_product(); /** - * The Woocommerce product. + * The WooCommerce product. * * @var \WC_Product $product */ diff --git a/modules/ppcp-api-client/src/Factory/class-orderfactory.php b/modules/ppcp-api-client/src/Factory/class-orderfactory.php index 2bc058886..19d70acd0 100644 --- a/modules/ppcp-api-client/src/Factory/class-orderfactory.php +++ b/modules/ppcp-api-client/src/Factory/class-orderfactory.php @@ -80,9 +80,9 @@ class OrderFactory { } /** - * Creates an Order object based off a Woocommerce order and another Order object. + * Creates an Order object based off a WooCommerce order and another Order object. * - * @param \WC_Order $wc_order The Woocommerce order. + * @param \WC_Order $wc_order The WooCommerce order. * @param Order $order The order object. * * @return Order diff --git a/modules/ppcp-api-client/src/Factory/class-payerfactory.php b/modules/ppcp-api-client/src/Factory/class-payerfactory.php index 8201e2d0c..0cd2043d5 100644 --- a/modules/ppcp-api-client/src/Factory/class-payerfactory.php +++ b/modules/ppcp-api-client/src/Factory/class-payerfactory.php @@ -37,9 +37,9 @@ class PayerFactory { } /** - * Returns a Payer object based off a Woocommerce customer. + * Returns a Payer object based off a WooCommerce customer. * - * @param \WC_Customer $customer The Woocommerce customer. + * @param \WC_Customer $customer The WooCommerce customer. * * @return Payer */ diff --git a/modules/ppcp-api-client/src/Factory/class-purchaseunitfactory.php b/modules/ppcp-api-client/src/Factory/class-purchaseunitfactory.php index e2a29bcec..eed3b3068 100644 --- a/modules/ppcp-api-client/src/Factory/class-purchaseunitfactory.php +++ b/modules/ppcp-api-client/src/Factory/class-purchaseunitfactory.php @@ -99,7 +99,7 @@ class PurchaseUnitFactory { } /** - * Creates a PurchaseUnit based off a Woocommerce order. + * Creates a PurchaseUnit based off a WooCommerce order. * * @param \WC_Order $order The order. * @@ -137,7 +137,7 @@ class PurchaseUnitFactory { } /** - * Creates a PurchaseUnit based off a Woocommerce cart. + * Creates a PurchaseUnit based off a WooCommerce cart. * * @param \WC_Cart $cart The cart. * diff --git a/modules/ppcp-api-client/src/Factory/class-shippingfactory.php b/modules/ppcp-api-client/src/Factory/class-shippingfactory.php index 0d25191c7..68bd80ded 100644 --- a/modules/ppcp-api-client/src/Factory/class-shippingfactory.php +++ b/modules/ppcp-api-client/src/Factory/class-shippingfactory.php @@ -34,9 +34,9 @@ class ShippingFactory { } /** - * Creates a shipping object based off a Woocommerce customer. + * Creates a shipping object based off a WooCommerce customer. * - * @param \WC_Customer $customer The Woocommerce customer. + * @param \WC_Customer $customer The WooCommerce customer. * * @return Shipping */ @@ -56,9 +56,9 @@ class ShippingFactory { } /** - * Creates a Shipping object based off a Woocommerce order. + * Creates a Shipping object based off a WooCommerce order. * - * @param \WC_Order $order The Woocommerce order. + * @param \WC_Order $order The WooCommerce order. * * @return Shipping */ diff --git a/modules/ppcp-api-client/src/Repository/class-cartrepository.php b/modules/ppcp-api-client/src/Repository/class-cartrepository.php index 422ca0df7..e893b0986 100644 --- a/modules/ppcp-api-client/src/Repository/class-cartrepository.php +++ b/modules/ppcp-api-client/src/Repository/class-cartrepository.php @@ -35,7 +35,7 @@ class CartRepository implements PurchaseUnitRepositoryInterface { } /** - * Returns all Pur of the Woocommerce cart. + * Returns all Pur of the WooCommerce cart. * * @return PurchaseUnit[] */ diff --git a/modules/ppcp-button/src/Endpoint/class-requestdata.php b/modules/ppcp-button/src/Endpoint/class-requestdata.php index 3fc70fac5..54d860c8f 100644 --- a/modules/ppcp-button/src/Endpoint/class-requestdata.php +++ b/modules/ppcp-button/src/Endpoint/class-requestdata.php @@ -58,7 +58,7 @@ class RequestData { } /** - * Woocommerce will give you a customer object on your 2nd request. the first page + * WooCommerce will give you a customer object on your 2nd request. the first page * load will not yet have this customer object, but the ajax request will. Therefore * the nonce validation will fail. this fixes this problem: * diff --git a/modules/ppcp-button/src/Helper/class-earlyorderhandler.php b/modules/ppcp-button/src/Helper/class-earlyorderhandler.php index 3d1bf85b9..622b4b2d4 100644 --- a/modules/ppcp-button/src/Helper/class-earlyorderhandler.php +++ b/modules/ppcp-button/src/Helper/class-earlyorderhandler.php @@ -148,7 +148,7 @@ class EarlyOrderHandler { /** * Configures the session, so we can pick up the order, once we pass through the checkout. * - * @param int $order_id The Woocommerce order id. + * @param int $order_id The WooCommerce order id. * @param Order $order The PayPal order. * * @return Order diff --git a/modules/ppcp-subscription/src/class-renewalhandler.php b/modules/ppcp-subscription/src/class-renewalhandler.php index 4a74ba192..09404b6ce 100644 --- a/modules/ppcp-subscription/src/class-renewalhandler.php +++ b/modules/ppcp-subscription/src/class-renewalhandler.php @@ -86,7 +86,7 @@ class RenewalHandler { /** * Renew an order. * - * @param \WC_Order $wc_order The Woocommerce order. + * @param \WC_Order $wc_order The WooCommerce order. */ public function renew( \WC_Order $wc_order ) { @@ -140,9 +140,9 @@ class RenewalHandler { } /** - * Process a Woocommerce order. + * Process a WooCommerce order. * - * @param \WC_Order $wc_order The Woocommerce order. + * @param \WC_Order $wc_order The WooCommerce order. * * @throws \Exception If customer cannot be read/found. */ @@ -169,7 +169,7 @@ class RenewalHandler { * Returns a payment token for a customer. * * @param \WC_Customer $customer The customer. - * @param \WC_Order $wc_order The current Woocommerce order we want to process. + * @param \WC_Order $wc_order The current WooCommerce order we want to process. * * @return PaymentToken|null */ @@ -198,10 +198,10 @@ class RenewalHandler { } /** - * If the PayPal order is captured/authorized the Woocommerce order gets updated accordingly. + * If the PayPal order is captured/authorized the WooCommerce order gets updated accordingly. * * @param Order $order The PayPal order. - * @param \WC_Order $wc_order The related Woocommerce order. + * @param \WC_Order $wc_order The related WooCommerce order. */ private function capture_order( Order $order, \WC_Order $wc_order ) { diff --git a/modules/ppcp-wc-gateway/extensions.php b/modules/ppcp-wc-gateway/extensions.php index be3b4e051..12fd63351 100644 --- a/modules/ppcp-wc-gateway/extensions.php +++ b/modules/ppcp-wc-gateway/extensions.php @@ -12,8 +12,8 @@ namespace Inpsyde\PayPalCommerce\WcGateway; use Inpsyde\PayPalCommerce\ApiClient\Endpoint\OrderEndpoint; use Inpsyde\PayPalCommerce\Session\SessionHandler; use Inpsyde\PayPalCommerce\WcGateway\Settings\Settings; -use Inpsyde\Woocommerce\Logging\Logger\NullLogger; -use Inpsyde\Woocommerce\Logging\Logger\WooCommerceLogger; +use Inpsyde\WooCommerce\Logging\Logger\NullLogger; +use Inpsyde\WooCommerce\Logging\Logger\WooCommerceLogger; use Psr\Container\ContainerInterface; use Psr\Log\LoggerInterface; diff --git a/modules/ppcp-wc-gateway/services.php b/modules/ppcp-wc-gateway/services.php index f8c8e5abe..ad334a12b 100644 --- a/modules/ppcp-wc-gateway/services.php +++ b/modules/ppcp-wc-gateway/services.php @@ -183,7 +183,7 @@ return array( 'sandbox_on' => array( 'title' => __( 'Sandbox', 'paypal-for-woocommerce' ), 'type' => 'checkbox', - 'label' => __( 'To test your Woocommerce installation, you can use the sandbox mode.', 'paypal-for-woocommerce' ), + 'label' => __( 'To test your WooCommerce installation, you can use the sandbox mode.', 'paypal-for-woocommerce' ), 'default' => 0, 'screens' => array( State::STATE_START, diff --git a/modules/ppcp-wc-gateway/src/Admin/class-ordertablepaymentstatuscolumn.php b/modules/ppcp-wc-gateway/src/Admin/class-ordertablepaymentstatuscolumn.php index 3f41a52f4..baaccf323 100644 --- a/modules/ppcp-wc-gateway/src/Admin/class-ordertablepaymentstatuscolumn.php +++ b/modules/ppcp-wc-gateway/src/Admin/class-ordertablepaymentstatuscolumn.php @@ -68,7 +68,7 @@ class OrderTablePaymentStatusColumn { * Render the column. * * @param string $column The column. - * @param int $wc_order_id The id or the Woocommerce order. + * @param int $wc_order_id The id or the WooCommerce order. */ public function render( string $column, int $wc_order_id ) { if ( ! $this->settings->has( 'intent' ) || $this->settings->get( 'intent' ) !== self::INTENT ) { @@ -96,7 +96,7 @@ class OrderTablePaymentStatusColumn { /** * Whether to render the authorization status of an order or not. * - * @param \WC_Order $order The Woocommerce order. + * @param \WC_Order $order The WooCommerce order. * * @return bool */ @@ -107,7 +107,7 @@ class OrderTablePaymentStatusColumn { /** * Whether the order has been captured or not. * - * @param \WC_Order $wc_order The Woocommerce order. + * @param \WC_Order $wc_order The WooCommerce order. * * @return bool */ diff --git a/modules/ppcp-wc-gateway/src/Admin/class-paymentstatusorderdetail.php b/modules/ppcp-wc-gateway/src/Admin/class-paymentstatusorderdetail.php index 6b4e029c1..2405b6f29 100644 --- a/modules/ppcp-wc-gateway/src/Admin/class-paymentstatusorderdetail.php +++ b/modules/ppcp-wc-gateway/src/Admin/class-paymentstatusorderdetail.php @@ -19,7 +19,7 @@ class PaymentStatusOrderDetail { /** * Renders the not captured information. * - * @param int $wc_order_id The Woocommerce order id. + * @param int $wc_order_id The WooCommerce order id. */ public function render( int $wc_order_id ) { $wc_order = new \WC_Order( $wc_order_id ); diff --git a/modules/ppcp-wc-gateway/src/Gateway/class-paypalgateway.php b/modules/ppcp-wc-gateway/src/Gateway/class-paypalgateway.php index 0db2c5498..dbbab5252 100644 --- a/modules/ppcp-wc-gateway/src/Gateway/class-paypalgateway.php +++ b/modules/ppcp-wc-gateway/src/Gateway/class-paypalgateway.php @@ -166,9 +166,9 @@ class PayPalGateway extends \WC_Payment_Gateway { } /** - * Process a payment for an Woocommerce order. + * Process a payment for an WooCommerce order. * - * @param int $order_id The Woocommerce order id. + * @param int $order_id The WooCommerce order id. * * @return array|null */ @@ -231,9 +231,9 @@ class PayPalGateway extends \WC_Payment_Gateway { } /** - * Captures an authorized payment for an Woocommerce order. + * Captures an authorized payment for an WooCommerce order. * - * @param \WC_Order $wc_order The Woocommerce order. + * @param \WC_Order $wc_order The WooCommerce order. * * @return bool */ diff --git a/modules/ppcp-wc-gateway/src/Processor/class-authorizedpaymentsprocessor.php b/modules/ppcp-wc-gateway/src/Processor/class-authorizedpaymentsprocessor.php index 153644b3e..4aad98740 100644 --- a/modules/ppcp-wc-gateway/src/Processor/class-authorizedpaymentsprocessor.php +++ b/modules/ppcp-wc-gateway/src/Processor/class-authorizedpaymentsprocessor.php @@ -1,6 +1,6 @@