Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: Codexshaper/laravel-woocommerce
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v3.0.3
Choose a base ref
...
head repository: Codexshaper/laravel-woocommerce
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
  • 5 commits
  • 3 files changed
  • 3 contributors

Commits on Sep 25, 2022

  1. Apply fixes from StyleCI

    StyleCIBot committed Sep 25, 2022

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    StyleCIBot StyleCI Bot
    Copy the full SHA
    d7cd7b4 View commit details
  2. Merge pull request #91 from Codexshaper/analysis-a6ndOZ

    Apply fixes from StyleCI
    Codexshaper authored Sep 25, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    b54d809 View commit details

Commits on Mar 5, 2024

  1. Allowed laravel 10.

    maab16 committed Mar 5, 2024
    Copy the full SHA
    4b8865d View commit details
  2. Apply fixes from StyleCI

    StyleCIBot committed Mar 5, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    StyleCIBot StyleCI Bot
    Copy the full SHA
    2fb541e View commit details
  3. Merge pull request #113 from Codexshaper/analysis-wObJeK

    Apply fixes from StyleCI
    Codexshaper authored Mar 5, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    a1fe0e2 View commit details
Showing with 54 additions and 54 deletions.
  1. +1 −1 composer.json
  2. +51 −51 src/WooCommerceAnalyticsApi.php
  3. +2 −2 src/WooCommerceApi.php
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@
},
"require-dev": {
"phpunit/phpunit": "^7.0|^8.0|^9.3",
"illuminate/support": "~5.5.40|~5.6.0|~5.7.0|~5.8.0|^6.0|^7.0|^8.0|^9.0"
"illuminate/support": "~5.5.40|~5.6.0|~5.7.0|~5.8.0|^6.0|^7.0|^8.0|^9.0|^10.0"
},
"license": "MIT",
"authors": [
102 changes: 51 additions & 51 deletions src/WooCommerceAnalyticsApi.php
Original file line number Diff line number Diff line change
@@ -1,51 +1,51 @@
<?php

namespace Codexshaper\WooCommerce;

use Automattic\WooCommerce\Client;
use Codexshaper\WooCommerce\Traits\WooCommerceTrait;

class WooCommerceAnalyticsApi
{
use WooCommerceTrait;

/**
*@var \Automattic\WooCommerce\Client
*/
protected $client;

/**
*@var array
*/
protected $headers = [];

/**
* Build Woocommerce connection.
*
* @return void
*/
public function __construct()
{
try {
$this->headers = [
'header_total' => config('woocommerce.header_total') ?? 'X-WP-Total',
'header_total_pages' => config('woocommerce.header_total_pages') ?? 'X-WP-TotalPages',
];

$this->client = new Client(
config('woocommerce.store_url'),
config('woocommerce.consumer_key'),
config('woocommerce.consumer_secret'),
[
'version' => 'wc-analytics',
'wp_api' => config('woocommerce.wp_api_integration'),
'verify_ssl' => config('woocommerce.verify_ssl'),
'query_string_auth' => config('woocommerce.query_string_auth'),
'timeout' => config('woocommerce.timeout'),
]
);
} catch (\Exception $e) {
throw new \Exception($e->getMessage(), 1);
}
}
}
<?php

namespace Codexshaper\WooCommerce;

use Automattic\WooCommerce\Client;
use Codexshaper\WooCommerce\Traits\WooCommerceTrait;

class WooCommerceAnalyticsApi
{
use WooCommerceTrait;

/**
* @var \Automattic\WooCommerce\Client
*/
protected $client;

/**
* @var array
*/
protected $headers = [];

/**
* Build Woocommerce connection.
*
* @return void
*/
public function __construct()
{
try {
$this->headers = [
'header_total' => config('woocommerce.header_total') ?? 'X-WP-Total',
'header_total_pages' => config('woocommerce.header_total_pages') ?? 'X-WP-TotalPages',
];

$this->client = new Client(
config('woocommerce.store_url'),
config('woocommerce.consumer_key'),
config('woocommerce.consumer_secret'),
[
'version' => 'wc-analytics',
'wp_api' => config('woocommerce.wp_api_integration'),
'verify_ssl' => config('woocommerce.verify_ssl'),
'query_string_auth' => config('woocommerce.query_string_auth'),
'timeout' => config('woocommerce.timeout'),
]
);
} catch (\Exception $e) {
throw new \Exception($e->getMessage(), 1);
}
}
}
4 changes: 2 additions & 2 deletions src/WooCommerceApi.php
Original file line number Diff line number Diff line change
@@ -10,12 +10,12 @@ class WooCommerceApi
use WooCommerceTrait;

/**
*@var \Automattic\WooCommerce\Client
* @var \Automattic\WooCommerce\Client
*/
protected $client;

/**
*@var array
* @var array
*/
protected $headers = [];