Skip to content

Commit

Permalink
v1.0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
seb86 committed Jan 3, 2024
1 parent 33f36cb commit b9d66ef
Show file tree
Hide file tree
Showing 9 changed files with 168 additions and 964 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
# Changelog for CoCart CORS

## v1.0.5 - 3rd January, 2024

* Fixed fatal error if the version of CoCart is undefined because the main plugin is not found.

## v1.0.4 - 6th November, 2023

### What's Changed?

* Initiating the plugin on `plugins_loaded` hook instead of `cocart_init` hook. Fixes [#20](https://github.com/co-cart/cocart-cors/issues/20)
* Initiating the plugin on `plugins_loaded` hook instead of `cocart_init` hook. Fixes [#20](https://github.com/cocart-headless/cocart-cors/issues/20)

### Compatibility

Expand Down
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CoCart - CORS Support
CoCart CORS Support

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<h1 align="center">CoCart - CORS</h1>
<h1 align="center">CoCart CORS</h1>

<p align="center"><img src="https://cocart.xyz/wp-content/uploads/2021/11/cocart-home-default.png.webp" alt="CoCart Logo" /></p>

Expand All @@ -16,11 +16,11 @@ CoCart will now work across multiple domains.

## Bugs

If you find an issue, please [report the issue](https://github.com/co-cart/cocart-cors/issues/new). Thank you.
If you find an issue, please [report the issue](https://github.com/cocart-headless/cocart-cors/issues/new). Thank you.

## License

[![License](https://img.shields.io/badge/license-GPL--3.0%2B-red.svg)](https://github.com/co-cart/cocart-cors/blob/master/LICENSE.md)
[![License](https://img.shields.io/badge/license-GPL--3.0%2B-red.svg)](https://github.com/cocart-headless/cocart-cors/blob/master/LICENSE.md)

Released under [GNU General Public License v3.0](http://www.gnu.org/licenses/gpl-3.0.html).

Expand All @@ -35,7 +35,7 @@ We have different channels at your disposal where you can find information about
<ul>
<li>📖 <strong>Docs</strong>: this is the place to learn how to use CoCart API. <a href="https://docs.cocart.xyz/#getting-started">Get started!</a></li>
<li>🧰 <strong>Resources</strong>: this is the hub of all CoCart resources to help you build a headless store. <a href="https://cocart.dev/?utm_medium=gh&utm_source=github&utm_campaign=readme&utm_content=cocart">Get resources!</a></li>
<li>👪 <strong>Community</strong>: use our Discord chat room to share any doubts, feedback and meet great people. This is your place too to share <a href="https://cocart.xyz/community/?utm_medium=gh&utm_source=github&utm_campaign=readme&utm_content=cocart">how are you planning to use CoCart!</a></li>
<li>👪 <strong>Community</strong>: use our Discord chat room to share any doubts, feedback and meet great people. This is your place too to share <a href="https://cocartapi.com/community/?utm_medium=gh&utm_source=github&utm_campaign=readme&utm_content=cocart">how are you planning to use CoCart!</a></li>
<li>🐞 <strong>GitHub</strong>: we use GitHub for bugs and pull requests, doubts are solved with the community.</li>
<li>🐦 <strong>Social media</strong>: a more informal place to interact with CoCart users, reach out to us on <a href="https://twitter.com/cocartapi">Twitter.</a></li>
<li>💌 <strong>Newsletter</strong>: do you want to receive the latest plugin updates and news? Subscribe <a href="https://twitter.com/cocartapi">here.</a></li>
Expand All @@ -45,7 +45,7 @@ We have different channels at your disposal where you can find information about

## Credits

Website [cocart.xyz](https://cocart.xyz) &nbsp;&middot;&nbsp;
Website [cocartapi.com](https://cocartapi.com) &nbsp;&middot;&nbsp;
GitHub [@co-cart](https://github.com/co-cart) &nbsp;&middot;&nbsp;
Twitter [@cocartapi](https://twitter.com/cocartapi)

Expand Down
10 changes: 5 additions & 5 deletions cocart-cors.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?php
/*
* Plugin Name: CoCart - CORS Support
* Plugin URI: https://cocart.xyz
* Plugin Name: CoCart CORS Support
* Plugin URI: https://cocartapi.com
* Description: Enables support for CORS to allow CoCart to work across multiple domains.
* Author: Sébastien Dumont
* Author URI: https://sebastiendumont.com
* Version: 1.0.4
* Author: CoCart Headless, LLC
* Author URI: https://cocartapi.com
* Version: 1.0.5
* Text Domain: cocart-cors
* Requires at least: 5.6
* Requires PHP: 7.4
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "co-cart/cocart-cors",
"name": "cocart-headless/cocart-cors",
"description": "CORS Support for CoCart.",
"homepage": "https://cocart.xyz",
"homepage": "https://cocartapi.com",
"type": "wordpress-plugin",
"keywords": [
"wordpress",
Expand Down Expand Up @@ -37,7 +37,7 @@
}
],
"support": {
"issues": "https://github.com/co-cart/cocart-cors/issues"
"issues": "https://github.com/cocart-headless/cocart-cors/issues"
},
"autoload": {
"classmap": [
Expand Down
8 changes: 4 additions & 4 deletions includes/class-cocart-cors.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ final class Plugin {
*
* @var string
*/
public static $version = '1.0.4';
public static $version = '1.0.5';

/**
* Initiate CoCart - CORS.
* Initiate CoCart CORS.
*
* @access public
*
Expand All @@ -45,7 +45,7 @@ public static function init() {
} );

// Filters the session cookie to allow CoCart to work across multiple domains.
if ( version_compare( \COCART_VERSION, '4.0.0', '<' ) ) {
if ( defined( 'COCART_VERSION' ) && version_compare( COCART_VERSION, '4.0.0', '<' ) ) {
add_filter( 'cocart_cookie_samesite', function() {
if ( is_ssl() ) {
return 'None; Secure';
Expand All @@ -66,7 +66,7 @@ public static function init() {
* @return string
*/
public static function get_name() {
return 'CoCart - CORS Support';
return 'CoCart CORS Support';
} // END get_name()

/**
Expand Down
Loading

0 comments on commit b9d66ef

Please sign in to comment.