Plugin Directory

Changeset 1498146


Ignore:
Timestamp:
09/19/2016 01:46:33 PM (10 years ago)
Author:
piwikpro
Message:

compatibility with new woocommerce

Location:
woocommerce-piwik-integration/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • woocommerce-piwik-integration/trunk/README.md

    r1330577 r1498146  
    77# Changelog
    88
     9* 2.1.3 - compatibility with new woocomerce
    910* 2.1.2 - Fixed bug with not tracking orders.
    1011* 2.1.1 - Fixed bug with empty list of categories, list of contributors was updated
  • woocommerce-piwik-integration/trunk/includes/class-wc-piwik.php

    r1330565 r1498146  
    1010class WC_Piwik extends WC_Integration
    1111{
    12     const PIWIK_PRO_URL = 'piwik.pro';
     12    const PIWIK_PRO_URL = 'panel.piwik.pro';
    1313
    1414    public $id;
     
    5656    function init_form_fields()
    5757    {
    58         $this->form_text_fields = array(
     58        $this->selfHostedFields = array(
    5959            'piwik_idsite' => array(
    6060                'title' => __('Piwik site ID', 'woocommerce'),
     
    6969        );
    7070
    71         $this->form_fields = array(
     71        $this->commonFields = array(
    7272            'piwik_standard_tracking_enabled' => array(
    7373                'title' => __('Tracking code', 'woocommerce'),
     
    9191                'checkboxgroup' => 'end',
    9292                'default' => 'yes'
    93             ),
     93            )
    9494        );
     95
     96        $this->form_fields = array_merge($this->selfHostedFields, $this->commonFields);
    9597    }
    9698
     
    446448            $this->setOption('piwik_idsite', $_GET['idsite']);
    447449            $this->setOption('piwik_domain_name', $_GET['piwikurl']);
     450
     451            $postData = [
     452                $this->get_field_key("piwik_domain_name") => $_GET['piwikurl'],
     453                $this->get_field_key("piwik_idsite") => $_GET['idsite']
     454            ];
     455
     456            $this->set_post_data($postData);
    448457            $this->process_admin_options();
     458
    449459            WC_Admin_Settings::add_message(__('Your site has been successfuly integrated with Piwik Cloud!',
    450460                'woocommerce'));
     
    514524        return $status;
    515525    }
    516 
    517526    protected function validateIntegrationValues()
    518527    {
  • woocommerce-piwik-integration/trunk/readme.txt

    r1330581 r1498146  
    3131== Changelog ==
    3232
     33= 2.1.3 - 19/09/2016 =
     34 * compatibility with new woocommerce
    3335= 2.1.2 - 15/01/2016 =
    3436 * Fixed issue with not traked orders
  • woocommerce-piwik-integration/trunk/templates/admin-options.php

    r993101 r1498146  
    2424    <h3 class="title title-custom">Self-hosted Piwik</h3>
    2525    <table class="form-table">
    26         <?php $this->generate_settings_html( $this->form_text_fields ); ?>
     26        <?php $this->generate_settings_html( $this->selfHostedFields ); ?>
    2727    </table>
    2828<?php
     
    6565<hr>
    6666<table class="form-table">
    67     <?php $this->generate_settings_html(); ?>
     67    <?php $this->generate_settings_html( $this->commonFields ); ?>
    6868</table>
    6969
Note: See TracChangeset for help on using the changeset viewer.