Changeset 1987816
- Timestamp:
- 12/07/2018 12:15:42 PM (7 years ago)
- Location:
- snappic
- Files:
-
- 12 edited
-
tags/1.1/includes/class-snappic-helper.php (modified) (2 diffs)
-
tags/1.1/includes/class-snappic-integration.php (modified) (1 diff)
-
tags/1.1/languages/snappic-for-woocommerce.pot (modified) (1 diff)
-
tags/1.1/readme.md (modified) (1 diff)
-
tags/1.1/readme.txt (modified) (2 diffs)
-
tags/1.1/snappic-for-woocommerce.php (modified) (3 diffs)
-
trunk/includes/class-snappic-helper.php (modified) (2 diffs)
-
trunk/includes/class-snappic-integration.php (modified) (1 diff)
-
trunk/languages/snappic-for-woocommerce.pot (modified) (1 diff)
-
trunk/readme.md (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/snappic-for-woocommerce.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
snappic/tags/1.1/includes/class-snappic-helper.php
r1817427 r1987816 174 174 */ 175 175 public function get_api_url($bypassSandbox = false) { 176 return add_query_arg('domain', $this->get_site_domain(), $this->get_api_host($bypassSandbox) . '/ stores/current');176 return add_query_arg('domain', $this->get_site_domain(), $this->get_api_host($bypassSandbox) . '/admin_frontend/stores/current'); 177 177 } 178 178 … … 209 209 public function get_signup_url($plan = '') { 210 210 $settings = Snappic_Integration::instance(); 211 212 // Check if API keys are correctly set. 213 $settings->check_api_keys(); 214 211 215 $consumerKey = $settings->get_option('cust_key'); 212 216 $consumerSecret = $settings->get_option('cust_secret'); -
snappic/tags/1.1/includes/class-snappic-integration.php
r1715114 r1987816 24 24 25 25 self::$_instance = $this; 26 } 27 28 /** 29 * Checks if API keys are set correctly. Otherwise regenerate new ones. 30 * 31 * @since 1.0.0 32 */ 33 public function check_api_keys() { 34 if ($this->get_option('cust_key') && $this->get_option('cust_secret')) { 35 return; 36 } 37 38 $this->set_api_keys(); 39 } 40 41 /** 42 * Generate API keys and stored them in our own settings. 43 * 44 * @since 1.0.0 45 */ 46 public function set_api_keys() { 47 update_option( 'woocommerce_api_enabled', 'yes' ); 48 49 include_once( 'class-snappic-auth.php' ); 50 $snappicAuth = new Snappic_Auth(); 51 $helper = Snappic_Helper::get_instance(); 52 $domain = $helper->get_site_domain(); 53 $result = $snappicAuth->generate_keys( __( 'Snappic', 'snappic-for-woocommerce' ), $domain, 'read' ); 54 55 if( ! is_wp_error( $result ) && !empty($result['key_id']) && !empty($result['consumer_key']) && !empty($result['consumer_secret']) ) { 56 57 $updated_options = array( 58 'key_id' => $result['key_id'], 59 'cust_key' => $result['consumer_key'], 60 'cust_secret' => $result['consumer_secret'], 61 'cleanup' => 'yes' 62 ); 63 64 $helper->update_options( $updated_options ); 65 $this->init_settings(); 66 } 26 67 } 27 68 -
snappic/tags/1.1/languages/snappic-for-woocommerce.pot
r1874793 r1987816 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: Snappic for WooCommerce 1. 0.7\n"5 "Project-Id-Version: Snappic for WooCommerce 1.1.0\n" 6 6 "Report-Msgid-Bugs-To: " 7 7 "https://wordpress.org/support/plugin/snappic-for-woocommerce\n" -
snappic/tags/1.1/readme.md
r1715114 r1987816 1 # Snappic for WooCommerce # 2 **Contributors:** [Snappic](https://profiles.wordpress.org/Snappic) 3 **Tags:** woocommerce, snappic, retargeting 4 **Requires at least:** 4.7 5 **Tested up to:** 4.8 6 **Stable tag:** 1.0.0-RC-2 7 **License:** GPLv3 8 **License URI:** http://www.gnu.org/licenses/gpl-3.0.html 9 **WC requires at least:** 3.0.0 10 **WC tested up to:** 3.1.1 1 # Snappic for WooCommerce 11 2 12 Insert Snappic tracking pixel into relevant pages 13 14 ## Description ## 15 16 We analyze each of your visitors, the products they looked at, and learn what they like. Next time they’re browsing Instagram or Facebook they’ll see a highly relevant ad specifically tailored to what they were looking at and other product recommendations. 17 18 ### Known Limitations ### 19 20 * Works with WooCommmerce 3.0 and up 21 22 ## Installation ## 23 1. Upload 'snappic-for-woocommerce' to the '/wp-content/plugins/' directory 24 1. Activate the plugin through the 'Plugins' menu in WordPress 25 1. Add your Snappic API key to WooCommerce->Settings->Integration->Integration tab 26 1. Enable shipping rate calculation in WooCommerce->Settings->Shipping->Snappic Shipping tab 27 28 ## Frequently Asked Questions ## 29 30 ### How do I get Snappic API key? ### 31 32 33 34 ## Screenshots ## 35 36 1. Plugin settings dialog 37 38 ## Upgrade Notice ## 39 40 41 ### 1.0 ### 42 * First release 43 44 ## Terms of Service ## 45 46 http://snappic.io/terms-of-service.html 3 See the [text version](readme.txt). -
snappic/tags/1.1/readme.txt
r1874793 r1987816 4 4 Tags: woocommerce, snappic, retargeting, facebook, Facebook Pixel, Facebook Conversion Pixel, New Facebook Pixel, Facebook retargeting, feed, Instagram, Instagram feed, Facebook ads, Instagram ads 5 5 Requires at least: 4.7 6 Tested up to: 4.87 Stable tag: 1. 0.76 Tested up to: 5.0 7 Stable tag: 1.1 8 8 License: GPLv3 9 9 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 44 44 1. Click on "Install Now" 45 45 1. Click on "Activate Plugin" 46 47 == Changelog == 48 49 = 1.1 (2018-12-7) = 50 * Updated to the new API url 51 * Improved API key generation 52 53 = 1.0 = 54 * First release -
snappic/tags/1.1/snappic-for-woocommerce.php
r1874793 r1987816 4 4 Plugin URI: https://wordpress.org/plugins/snappic-for-woocommerce/ 5 5 Description: Link your WooCommerce store to Snappic 6 Version: 1. 06 Version: 1.1.0 7 7 Author: Snappic 8 8 Author URI: https://www.snappic.io … … 15 15 16 16 class Snappic_Base { 17 const VERSION = '1. 0.7';17 const VERSION = '1.1.0'; 18 18 const REQUIRED_WOO = '3.1.0'; 19 19 … … 155 155 */ 156 156 public function delayed_install() { 157 158 157 if( ! $this->helper->get_stored_pixel_id() ) { 159 160 update_option( 'woocommerce_api_enabled', 'yes' ); 161 162 include_once( 'includes/class-snappic-auth.php' ); 163 $snappicAuth = new Snappic_Auth(); 164 $domain = $this->helper->get_site_domain(); 165 $result = $snappicAuth->generate_keys( __( 'Snappic', 'snappic-for-woocommerce' ), $domain, 'read' ); 166 167 if( ! is_wp_error( $result ) ) { 168 169 $updated_options = array( 170 'key_id' => $result['key_id'], 171 'cust_key' => $result['consumer_key'], 172 'cust_secret' => $result['consumer_secret'], 173 'cleanup' => 'yes' 174 ); 175 176 $this->helper->update_options( $updated_options ); 177 } 178 179 } 180 158 $settings = Snappic_Integration::instance(); 159 $settings->set_api_keys(); 160 } 181 161 } 182 162 -
snappic/trunk/includes/class-snappic-helper.php
r1817427 r1987816 174 174 */ 175 175 public function get_api_url($bypassSandbox = false) { 176 return add_query_arg('domain', $this->get_site_domain(), $this->get_api_host($bypassSandbox) . '/ stores/current');176 return add_query_arg('domain', $this->get_site_domain(), $this->get_api_host($bypassSandbox) . '/admin_frontend/stores/current'); 177 177 } 178 178 … … 209 209 public function get_signup_url($plan = '') { 210 210 $settings = Snappic_Integration::instance(); 211 212 // Check if API keys are correctly set. 213 $settings->check_api_keys(); 214 211 215 $consumerKey = $settings->get_option('cust_key'); 212 216 $consumerSecret = $settings->get_option('cust_secret'); -
snappic/trunk/includes/class-snappic-integration.php
r1715114 r1987816 24 24 25 25 self::$_instance = $this; 26 } 27 28 /** 29 * Checks if API keys are set correctly. Otherwise regenerate new ones. 30 * 31 * @since 1.0.0 32 */ 33 public function check_api_keys() { 34 if ($this->get_option('cust_key') && $this->get_option('cust_secret')) { 35 return; 36 } 37 38 $this->set_api_keys(); 39 } 40 41 /** 42 * Generate API keys and stored them in our own settings. 43 * 44 * @since 1.0.0 45 */ 46 public function set_api_keys() { 47 update_option( 'woocommerce_api_enabled', 'yes' ); 48 49 include_once( 'class-snappic-auth.php' ); 50 $snappicAuth = new Snappic_Auth(); 51 $helper = Snappic_Helper::get_instance(); 52 $domain = $helper->get_site_domain(); 53 $result = $snappicAuth->generate_keys( __( 'Snappic', 'snappic-for-woocommerce' ), $domain, 'read' ); 54 55 if( ! is_wp_error( $result ) && !empty($result['key_id']) && !empty($result['consumer_key']) && !empty($result['consumer_secret']) ) { 56 57 $updated_options = array( 58 'key_id' => $result['key_id'], 59 'cust_key' => $result['consumer_key'], 60 'cust_secret' => $result['consumer_secret'], 61 'cleanup' => 'yes' 62 ); 63 64 $helper->update_options( $updated_options ); 65 $this->init_settings(); 66 } 26 67 } 27 68 -
snappic/trunk/languages/snappic-for-woocommerce.pot
r1874793 r1987816 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: Snappic for WooCommerce 1. 0.7\n"5 "Project-Id-Version: Snappic for WooCommerce 1.1.0\n" 6 6 "Report-Msgid-Bugs-To: " 7 7 "https://wordpress.org/support/plugin/snappic-for-woocommerce\n" -
snappic/trunk/readme.md
r1715114 r1987816 1 # Snappic for WooCommerce # 2 **Contributors:** [Snappic](https://profiles.wordpress.org/Snappic) 3 **Tags:** woocommerce, snappic, retargeting 4 **Requires at least:** 4.7 5 **Tested up to:** 4.8 6 **Stable tag:** 1.0.0-RC-2 7 **License:** GPLv3 8 **License URI:** http://www.gnu.org/licenses/gpl-3.0.html 9 **WC requires at least:** 3.0.0 10 **WC tested up to:** 3.1.1 1 # Snappic for WooCommerce 11 2 12 Insert Snappic tracking pixel into relevant pages 13 14 ## Description ## 15 16 We analyze each of your visitors, the products they looked at, and learn what they like. Next time they’re browsing Instagram or Facebook they’ll see a highly relevant ad specifically tailored to what they were looking at and other product recommendations. 17 18 ### Known Limitations ### 19 20 * Works with WooCommmerce 3.0 and up 21 22 ## Installation ## 23 1. Upload 'snappic-for-woocommerce' to the '/wp-content/plugins/' directory 24 1. Activate the plugin through the 'Plugins' menu in WordPress 25 1. Add your Snappic API key to WooCommerce->Settings->Integration->Integration tab 26 1. Enable shipping rate calculation in WooCommerce->Settings->Shipping->Snappic Shipping tab 27 28 ## Frequently Asked Questions ## 29 30 ### How do I get Snappic API key? ### 31 32 33 34 ## Screenshots ## 35 36 1. Plugin settings dialog 37 38 ## Upgrade Notice ## 39 40 41 ### 1.0 ### 42 * First release 43 44 ## Terms of Service ## 45 46 http://snappic.io/terms-of-service.html 3 See the [text version](readme.txt). -
snappic/trunk/readme.txt
r1874793 r1987816 4 4 Tags: woocommerce, snappic, retargeting, facebook, Facebook Pixel, Facebook Conversion Pixel, New Facebook Pixel, Facebook retargeting, feed, Instagram, Instagram feed, Facebook ads, Instagram ads 5 5 Requires at least: 4.7 6 Tested up to: 4.87 Stable tag: 1. 0.76 Tested up to: 5.0 7 Stable tag: 1.1 8 8 License: GPLv3 9 9 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 44 44 1. Click on "Install Now" 45 45 1. Click on "Activate Plugin" 46 47 == Changelog == 48 49 = 1.1 (2018-12-7) = 50 * Updated to the new API url 51 * Improved API key generation 52 53 = 1.0 = 54 * First release -
snappic/trunk/snappic-for-woocommerce.php
r1874793 r1987816 4 4 Plugin URI: https://wordpress.org/plugins/snappic-for-woocommerce/ 5 5 Description: Link your WooCommerce store to Snappic 6 Version: 1. 06 Version: 1.1.0 7 7 Author: Snappic 8 8 Author URI: https://www.snappic.io … … 15 15 16 16 class Snappic_Base { 17 const VERSION = '1. 0.7';17 const VERSION = '1.1.0'; 18 18 const REQUIRED_WOO = '3.1.0'; 19 19 … … 155 155 */ 156 156 public function delayed_install() { 157 158 157 if( ! $this->helper->get_stored_pixel_id() ) { 159 160 update_option( 'woocommerce_api_enabled', 'yes' ); 161 162 include_once( 'includes/class-snappic-auth.php' ); 163 $snappicAuth = new Snappic_Auth(); 164 $domain = $this->helper->get_site_domain(); 165 $result = $snappicAuth->generate_keys( __( 'Snappic', 'snappic-for-woocommerce' ), $domain, 'read' ); 166 167 if( ! is_wp_error( $result ) ) { 168 169 $updated_options = array( 170 'key_id' => $result['key_id'], 171 'cust_key' => $result['consumer_key'], 172 'cust_secret' => $result['consumer_secret'], 173 'cleanup' => 'yes' 174 ); 175 176 $this->helper->update_options( $updated_options ); 177 } 178 179 } 180 158 $settings = Snappic_Integration::instance(); 159 $settings->set_api_keys(); 160 } 181 161 } 182 162
Note: See TracChangeset
for help on using the changeset viewer.