Changeset 2596602
- Timestamp:
- 09/10/2021 01:31:25 AM (4 years ago)
- Location:
- integrai
- Files:
-
- 8 edited
- 1 copied
-
tags/1.0.16 (copied) (copied from integrai/trunk)
-
tags/1.0.16/includes/class-integrai.php (modified) (2 diffs)
-
tags/1.0.16/integrai.php (modified) (2 diffs)
-
tags/1.0.16/public/class-integrai-public.php (modified) (2 diffs)
-
tags/1.0.16/readme.txt (modified) (1 diff)
-
trunk/includes/class-integrai.php (modified) (2 diffs)
-
trunk/integrai.php (modified) (2 diffs)
-
trunk/public/class-integrai-public.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
integrai/tags/1.0.16/includes/class-integrai.php
r2588846 r2596602 29 29 $this->version = INTEGRAI_VERSION; 30 30 } else { 31 $this->version = '1.0.1 5';31 $this->version = '1.0.16'; 32 32 } 33 33 $this->Integrai = 'integrai'; … … 108 108 $this->loader->add_action( 'woocommerce_order_status_cancelled', $plugin_public, 'woocommerce_order_status_cancelled' ); 109 109 $this->loader->add_action( 'woocommerce_order_refunded', $plugin_public, 'woocommerce_order_refunded' ); 110 $this->loader->add_action( 'save_post', $plugin_public, 'woocommerce_save_product', 10, 3 ); 110 111 111 112 // QUOTE -
integrai/tags/1.0.16/integrai.php
r2588846 r2596602 17 17 * Plugin URI: https://github.com/integrai/woocommerce 18 18 * Description: Integração com os principais meios de pagamento e cálculo de frete para a sua plataforma de e-commerce WP WooCommerce. 19 * Version: 1.0.1 519 * Version: 1.0.16 20 20 * Author: Integrai 21 21 * Author URI: https://integrai.com.br … … 39 39 * Rename this for your plugin and update it as you release new versions. 40 40 */ 41 if ( ! defined( 'INTEGRAI__PLUGIN_DIR' ) ) define( 'INTEGRAI_VERSION', '1.0.1 5' );41 if ( ! defined( 'INTEGRAI__PLUGIN_DIR' ) ) define( 'INTEGRAI_VERSION', '1.0.16' ); 42 42 if ( ! defined( 'INTEGRAI__PLUGIN_DIR' ) ) define( 'INTEGRAI__PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); 43 43 -
integrai/tags/1.0.16/public/class-integrai-public.php
r2588825 r2596602 29 29 const ABANDONED_CART = 'ABANDONED_CART'; 30 30 const ABANDONED_CART_ITEM = 'ABANDONED_CART_ITEM'; 31 const CREATE_PRODUCT = 'CREATE_PRODUCT'; 32 const UPDATE_PRODUCT = 'UPDATE_PRODUCT'; 31 33 32 34 public function __construct( $integrai, $version ) { … … 519 521 } 520 522 523 // SAVE PRODUCT 524 public function woocommerce_save_product( $post_id, $post, $update ) { 525 if ($post->post_type != 'product') { 526 return; 527 } 528 529 $event = null; 530 if( ! $update && $post->post_status === "auto-draft" ) { 531 $event = self::CREATE_PRODUCT; 532 } else if ( $update && !strpos( wp_get_raw_referer(), 'post-new' ) ) { 533 $event = self::UPDATE_PRODUCT; 534 } 535 536 $product = wc_get_product( $post ); 537 538 if (isset($product) && $this->get_config_helper()->event_is_enabled($event)) { 539 return $this->get_api_helper()->send_event($event, $product->get_data()); 540 } 541 } 542 543 521 544 /** CRON - EVENTS: */ 522 545 public function integrai_custom_cron_schedules( $schedules ) { -
integrai/tags/1.0.16/readme.txt
r2588846 r2596602 6 6 Requires PHP: 5.6 7 7 Tested up to: 5.7 8 Stable tag: 1.0.1 58 Stable tag: 1.0.16 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html -
integrai/trunk/includes/class-integrai.php
r2588846 r2596602 29 29 $this->version = INTEGRAI_VERSION; 30 30 } else { 31 $this->version = '1.0.1 5';31 $this->version = '1.0.16'; 32 32 } 33 33 $this->Integrai = 'integrai'; … … 108 108 $this->loader->add_action( 'woocommerce_order_status_cancelled', $plugin_public, 'woocommerce_order_status_cancelled' ); 109 109 $this->loader->add_action( 'woocommerce_order_refunded', $plugin_public, 'woocommerce_order_refunded' ); 110 $this->loader->add_action( 'save_post', $plugin_public, 'woocommerce_save_product', 10, 3 ); 110 111 111 112 // QUOTE -
integrai/trunk/integrai.php
r2588846 r2596602 17 17 * Plugin URI: https://github.com/integrai/woocommerce 18 18 * Description: Integração com os principais meios de pagamento e cálculo de frete para a sua plataforma de e-commerce WP WooCommerce. 19 * Version: 1.0.1 519 * Version: 1.0.16 20 20 * Author: Integrai 21 21 * Author URI: https://integrai.com.br … … 39 39 * Rename this for your plugin and update it as you release new versions. 40 40 */ 41 if ( ! defined( 'INTEGRAI__PLUGIN_DIR' ) ) define( 'INTEGRAI_VERSION', '1.0.1 5' );41 if ( ! defined( 'INTEGRAI__PLUGIN_DIR' ) ) define( 'INTEGRAI_VERSION', '1.0.16' ); 42 42 if ( ! defined( 'INTEGRAI__PLUGIN_DIR' ) ) define( 'INTEGRAI__PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); 43 43 -
integrai/trunk/public/class-integrai-public.php
r2588825 r2596602 29 29 const ABANDONED_CART = 'ABANDONED_CART'; 30 30 const ABANDONED_CART_ITEM = 'ABANDONED_CART_ITEM'; 31 const CREATE_PRODUCT = 'CREATE_PRODUCT'; 32 const UPDATE_PRODUCT = 'UPDATE_PRODUCT'; 31 33 32 34 public function __construct( $integrai, $version ) { … … 519 521 } 520 522 523 // SAVE PRODUCT 524 public function woocommerce_save_product( $post_id, $post, $update ) { 525 if ($post->post_type != 'product') { 526 return; 527 } 528 529 $event = null; 530 if( ! $update && $post->post_status === "auto-draft" ) { 531 $event = self::CREATE_PRODUCT; 532 } else if ( $update && !strpos( wp_get_raw_referer(), 'post-new' ) ) { 533 $event = self::UPDATE_PRODUCT; 534 } 535 536 $product = wc_get_product( $post ); 537 538 if (isset($product) && $this->get_config_helper()->event_is_enabled($event)) { 539 return $this->get_api_helper()->send_event($event, $product->get_data()); 540 } 541 } 542 543 521 544 /** CRON - EVENTS: */ 522 545 public function integrai_custom_cron_schedules( $schedules ) { -
integrai/trunk/readme.txt
r2588846 r2596602 6 6 Requires PHP: 5.6 7 7 Tested up to: 5.7 8 Stable tag: 1.0.1 58 Stable tag: 1.0.16 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html
Note: See TracChangeset
for help on using the changeset viewer.