diff --git a/plugin.json b/plugin.json index 74a3e1e..15f6a9a 100644 --- a/plugin.json +++ b/plugin.json @@ -1,7 +1,7 @@ { "name": "woonuxt Settings", - "version": "1.0.49", - "download_url": "https://github.com/scottyzen/woonuxt-settings/releases/download/1.0.49/woonuxt-settings.zip", + "version": "1.0.50", + "download_url": "https://github.com/scottyzen/woonuxt-settings/releases/download/1.0.50/woonuxt-settings.zip", "homepage": "https://woonuxt.com/", "tested": "6.3.2", @@ -13,7 +13,7 @@ "sections": { "description": "WooNuxt is unmatched when it comes to performance and scalability. Reap the benefits of having a online store that out performs all of your competitors.", "installation": "(Recommended) Installation instructions.", - "changelog": "

1.0.49

Add SEO settings

1.0.49

Add functionality to increase max query amount if there are more than 100 products

1.0.45

Fix error when WooCommerce is disabled or not installed

" + "changelog": "

1.0.50

Add SEO settings

1.0.50

Add functionality to increase max query amount if there are more than 100 products

1.0.45

Fix error when WooCommerce is disabled or not installed

" }, "icons": { diff --git a/woonuxt.php b/woonuxt.php index 40e6b81..f86d0ed 100644 --- a/woonuxt.php +++ b/woonuxt.php @@ -1,23 +1,20 @@ 'WooGraphQL', 'description' => 'Enables GraphQL to work with WooCommerce.', 'url' => - 'https://github.com/wp-graphql/wp-graphql-woocommerce/releases/download/v' . - WOO_GRAPHQL_VERSION . - '/wp-graphql-woocommerce.zip', + 'https://github.com/wp-graphql/wp-graphql-woocommerce/releases/download/v' . WOO_GRAPHQL_VERSION . '/wp-graphql-woocommerce.zip', 'file' => 'wp-graphql-woocommerce/wp-graphql-woocommerce.php', - 'icon' => - 'https://woographql.com/_next/image?url=https%3A%2F%2Fadasmqnzur.cloudimg.io%2Fsuperduper.axistaylor.com%2Fapp%2Fuploads%2Fsites%2F4%2F2022%2F08%2Flogo-1.png%3Ffunc%3Dbound%26w%3D300%26h%3D300&w=384&q=75', + 'icon' => 'https://woographql.com/_next/image?url=https%3A%2F%2Fadasmqnzur.cloudimg.io%2Fsuperduper.axistaylor.com%2Fapp%2Fuploads%2Fsites%2F4%2F2022%2F08%2Flogo-1.png%3Ffunc%3Dbound%26w%3D300%26h%3D300&w=384&q=75', 'slug' => 'woographql', ], 'wp-graphql-cors' => [ @@ -128,13 +99,9 @@ function pluginActionLinksWoonuxt($links) function getGithubVersionNumber(){ $github_url = 'https://raw.githubusercontent.com/scottyzen/woonuxt-settings/master/woonuxt.php'; $github_file = file_get_contents($github_url); - if (false === $github_file) { - return '0.0.0'; - } + if (false === $github_file) { return '0.0.0'; } preg_match('/WOONUXT_SETTINGS_VERSION\', \'(.*?)\'/', $github_file, $matches); - if (!isset($matches[1])) { - return '0.0.0'; - } + if (!isset($matches[1])) { return '0.0.0'; } return $matches[1]; } @@ -172,11 +139,7 @@ function wooNuxtOptionsPageHtml(){
- +
=')) { - return; - } + if (version_compare($current_version, $github_version, '>=')) { return; } - $update_url = - 'https://github.com/scottyzen/woonuxt-settings/releases/download/' . $github_version . '/woonuxt-settings.zip'; + $update_url = "https://github.com/scottyzen/woonuxt-settings/releases/download/{$github_version}/woonuxt-settings.zip"; $update_text = 'Update WooNuxt Settings Plugin'; echo '
'; - printf( - '

There is an update available for the WooNuxt Settings Plugin. Click %s to update from version %s to %s

', - esc_url($update_url), - esc_html($update_text), - esc_html($current_version), - esc_html($github_version), - ); + printf('

There is an update available for the WooNuxt Settings Plugin. Click %s to update from version %s to %s

', esc_url($update_url), esc_html($update_text), esc_html($current_version), esc_html($github_version) ); echo '
';?> + jQuery(document).ready(function ($) { + $.ajax({ + url: ajaxurl, + type: 'POST', + data: { + action: 'check_plugin_status', + security: '', + plugin: '', + file: '', + }, + success (response) { + if (response === 'installed') { + $('.plugin-state_ .plugin-state_installed').show(); + } else { + $('.plugin-state_ .plugin-state_install').show(); + } + $('.plugin-state_ .plugin-state_loading').hide(); + }, + error (error) { + console.log(error); + } + }); + }); + -install($plugin['url']); - if (!is_wp_error($result)) { - activate_plugin($plugin['file']); +install($plugin['url']); + if (!is_wp_error($result)) { + activate_plugin($plugin['file']); + } } } } } -} +?> -function deployButtonCallback() -{ +
- - Deploy to Netlify + class="mr-8" > + Deploy to Netlify Deploy to Vercel
-
- style="margin-top: 20px;" - > +
style="margin-top: 20px;" > Required settings for WooNuxt

These settings are required for WooNuxt to work properly. Click the links below to go to the respective settings page.

WPGraphQL settings

@@ -449,7 +388,6 @@ class="mr-8"
  • Enable Public Introspection.
  • -

    WPGraphQL CORS settings