Plugin Directory

Changeset 2515261


Ignore:
Timestamp:
04/15/2021 01:16:13 AM (5 years ago)
Author:
justbeco
Message:

record price and currency for an order.

Location:
sakura-network/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sakura-network/trunk/readme.txt

    r2509200 r2515261  
    55Tested up to: 5.6
    66Requires PHP: 7.0
    7 Stable tag: 1.0.6
     7Stable tag: 1.0.7
    88License: GPLv3
    99License URI: https://www.gnu.org/licenses/gpl-3.0.html
     
    5151== Changelog ==
    5252
     53= 1.0.7 - 2021-04-15 =
     54
     55**Sakura network**
     56
     57* new feature: record price and currency for an order.
     58
     59
    5360= 1.0.6 - 2021-04-05 =
    5461
  • sakura-network/trunk/sakura.php

    r2509200 r2515261  
    44 * Plugin URI: https://www.sakura.eco
    55 * Description: An eCommerce toolkit that helps you show articles in a Sakura network.
    6  * Version: 1.0.6
     6 * Version: 1.0.7
    77 * Author: Sakura.eco
    88 * Author URI: https://www.sakura.eco/
     
    5151   * @var string
    5252   */
    53   public $version = '1.0.6';
     53  public $version = '1.0.7';
    5454 
    5555  /**
     
    6767    */
    6868         private function init_hooks() {
     69       do_action('sakura_record_activity', 'Initialize hooks for sakura network');
    6970       add_action( 'init', array( $this, 'init' ), 999 );
    7071       add_action( 'init', array( $this, 'init_block' ));
     
    195196              do_action('sakura_record_activity', sprintf('notify sakura for new order: #%d', $order_id));
    196197              foreach ($order->get_items() as $item_id => $item) {
    197                   $product    = $item->get_product();
     198                  $product = $item->get_product();
    198199                  $payload = array(
    199200                      'event' => 'purchase',
     
    201202                      'sakura-widget-key' => $sakura_widget_key,
    202203                      'sku' => $product->get_sku(),
     204                      'total' => $item->get_total(),
     205                      'currency' => get_woocommerce_currency(),
    203206                      'amount' => $item->get_quantity(),
    204207                      'id' => $order_id,
     
    444447      $sakura_server = apply_filters('sakura_update_server_address', 'https://www.sakura.eco');
    445448      $url = $sakura_server . '/widget/' . $sakura_widget_key;
     449 
     450      $query_args = array();
    446451 
    447452      $history = SC()->sakura_history_in_cookie();
Note: See TracChangeset for help on using the changeset viewer.