Skip to content

Commit

Permalink
Merge pull request #84 from BeAPI/ver/6.1.20
Browse files Browse the repository at this point in the history
Release 6.1.20
  • Loading branch information
petitphp authored Aug 3, 2023
2 parents c306590 + 89d3ec2 commit d7a807a
Show file tree
Hide file tree
Showing 9 changed files with 846 additions and 1,846 deletions.
1 change: 0 additions & 1 deletion .distignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
bin
node_modules
tests
vendor
wordpress
.distignore
.dockerignore
Expand Down
2 changes: 1 addition & 1 deletion .lando.dist.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: shoppingfeed-for-woocommerce
recipe: wordpress
config:
php: '7.1'
php: '7.3'
webroot: ./wordpress/
env:
- .env.testing
Expand Down
2 changes: 1 addition & 1 deletion .plugin-data
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"version": "6.1.19",
"version": "6.1.20",
"slug": "shopping-feed"
}
2 changes: 1 addition & 1 deletion grumphp.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# grumphp.yml
parameters:
grumphp:
tasks:
git_blacklist:
keywords:
Expand Down
17 changes: 10 additions & 7 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,22 @@

* Contributors: ShoppingFeed, BeAPI
* Tags: shoppingfeed, marketplace, woocommerce, woocommerce shoppingfeed, create woocommerce products shoppingfeed, products feed, generate shoppingfeed, amazon, Jet, Walmart, many marketplace, import orders
* Stable tag: 6.1.19
* Version: 6.1.19
* Requires PHP: 5.6
* Requires at least: 5.2
* Tested up to: 5.8.0
* WC requires at least: 3.8
* WC tested up to: 5.5.2
* Stable tag: 6.1.20
* Version: 6.1.20
* Requires PHP: 7.1
* Requires at least: 5.7
* Tested up to: 6.2
* WC requires at least: 5.1.0
* WC tested up to: 7.7

## Upgrade Notice

> Version 6.0.0 is a major version, there are several changes and improvements which affect the architecture of the plugin. You will have to re-configure the plugin, all the previous settings will be lost
## Changelog
* 6.1.20
* Fix an issue with migration process failing to be scheduled with new version of Woocommerce.
* Update plugin requirements
* 6.1.19
* Update 'shopping_feed_variation_images' filter to include the WC variation ID.
* 6.1.18
Expand Down
7 changes: 5 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
## ShoppingFeed
Contributors: ShoppingFeed, BeAPI
Tags: shoppingfeed, marketplace, woocommerce, woocommerce shoppingfeed, create woocommerce products shoppingfeed, products feed, generate shoppingfeed, amazon, Jet, Walmart, many marketplace, import orders
Stable tag: 6.1.19
Version: 6.1.19
Stable tag: 6.1.20
Version: 6.1.20
Requires PHP: 7.1
Requires at least: 5.7
Tested up to: 6.2
Expand All @@ -13,6 +13,9 @@ WC tested up to: 7.7
Version 6.0.0 is a major version, there are several changes and improvements which affect the architecture of the plugin. You will have to re-configure the plugin, all the previous settings will be lost

== Changelog ==
* 6.1.20
* Fix an issue with migration process failing to be scheduled with new version of Woocommerce.
* Update plugin requirements
* 6.1.19
* Update 'shopping_feed_variation_images' filter to include the WC variation ID.
* 6.1.18
Expand Down
4 changes: 2 additions & 2 deletions shoppingfeed.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* Author URI: https://www.shopping-feed.com/
* Text Domain: shopping-feed
* Domain Path: /languages
* Version: 6.1.19
* Version: 6.1.20
* Requires at least: 5.7
* Requires PHP: 7.1
* WC requires at least: 5.1.0
Expand All @@ -26,7 +26,7 @@
require_once plugin_dir_path( __FILE__ ) . '/vendor/autoload.php';
}

define( 'SF_VERSION', '6.1.19' );
define( 'SF_VERSION', '6.1.20' );
define( 'SF_DB_VERSION_SLUG', 'SF_DB_VERSION' );
define( 'SF_DB_VERSION', '1.0.0' );
define( 'SF_UPGRADE_RUNNING', 'SF_UPGRADE_RUNNING' );
Expand Down
29 changes: 16 additions & 13 deletions src/ShoppingFeed.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ private function __construct() {
$this->actions = new WoocommerceActions();

//Check Upgrade
add_action( 'init', array( $this, 'do_migration' ), 25 );
if ( ! $this->check_upgrade() ) {
return;
}
Expand Down Expand Up @@ -290,19 +291,6 @@ function () {
return false;
}

//check if we need to do migration
if (
! empty( $_GET['sf_action'] ) &&
'sf_migrate_single' === $_GET['sf_action'] &&
isset( $_GET['_wpnonce'] ) &&
wp_verify_nonce( wp_unslash( $_GET['_wpnonce'] ), 'sf_migrate_single' ) // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
) {
$id_action = as_enqueue_async_action( 'sf_migrate_single_action', array(), 'sf_migrate_single' );
update_option( SF_UPGRADE_RUNNING, $id_action );
wp_safe_redirect( admin_url( '/' ), 302 );
exit;
}

add_action(
'admin_notices',
function () {
Expand Down Expand Up @@ -331,4 +319,19 @@ function () {

return false;
}

public function do_migration(): void {
//check if we need to do migration
if (
! empty( $_GET['sf_action'] ) &&
'sf_migrate_single' === $_GET['sf_action'] &&
isset( $_GET['_wpnonce'] ) &&
wp_verify_nonce( wp_unslash( $_GET['_wpnonce'] ), 'sf_migrate_single' ) // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
) {
$id_action = as_enqueue_async_action( 'sf_migrate_single_action', array(), 'sf_migrate_single' );
update_option( SF_UPGRADE_RUNNING, $id_action );
wp_safe_redirect( admin_url( '/' ), 302 );
exit;
}
}
}
Loading

0 comments on commit d7a807a

Please sign in to comment.