Plugin Directory

Changeset 1969690


Ignore:
Timestamp:
11/06/2018 10:00:36 AM (7 years ago)
Author:
storespot
Message:

v1.0.8

Location:
storespot
Files:
10 edited
1 copied

Legend:

Unmodified
Added
Removed
  • storespot/tags/1.0.8/admin/class-storespot-api.php

    r1955784 r1969690  
    5858    public function get_storespot_settings($request) {
    5959        if ( wp_next_scheduled( 'stsp_product_feed_update' ) ) {
    60             $cronjob = wp_next_scheduled( 'stsp_product_feed_update' );
     60            $cronjob = date(
     61                'Y-m-d h:i:s',
     62                wp_next_scheduled( 'stsp_product_feed_update' )
     63            );
    6164        } else {
    6265            $cronjob = false;
    6366        }
    6467
     68        if ( ! function_exists( 'get_plugins' ) ) {
     69            require_once ABSPATH . 'wp-admin/includes/plugin.php';
     70        }
     71
     72        $plugins = get_plugins();
     73        $plugins_view = array();
     74        foreach( $plugins as $plugin ) {
     75            array_push($plugins_view, array(
     76                'name'      => $plugin['Name'],
     77                'version' => $plugin['Version'],
     78            ));
     79        }
     80
    6581        $data = array(
    66             'cronjob' => $cronjob,
    67             'plugin_version' => STORESPOT_VERSION,
    68             'settings' => get_option( ' storespot_settings' ),
     82            'cronjob'               => $cronjob,
     83            'plugin_version'    => STORESPOT_VERSION,
     84            'settings'              => get_option( ' storespot_settings' ),
     85            'wp_version'            => get_bloginfo( 'version' ),
     86            'wc_version'            => get_option( 'woocommerce_version' ),
     87            'plugins'               => $plugins_view,
    6988        );
     89
    7090        $response = rest_ensure_response($data);
    7191        $response->set_status(200);
  • storespot/tags/1.0.8/includes/class-storespot.php

    r1957373 r1969690  
    3131    public function init() {
    3232        if ( class_exists( 'WC_Integration' ) ) {
    33             $this->load_dependencies();
    34             $this->define_admin_hooks();
    35             $this->define_public_hooks();
    36             $this->define_api_hooks();
    37             $this->run();
     33            $loaded = $this->load_dependencies();
     34            if( $loaded ) {
     35                $this->define_admin_hooks();
     36                $this->define_public_hooks();
     37                $this->define_api_hooks();
     38                $this->run();
     39            }
    3840        }
    3941    }
     
    4143    private function load_dependencies() {
    4244        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-storespot-loader.php';
    43         require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-storespot-product-feed.php';
     45        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-storespot-productfeed.php';
    4446        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-storespot-messages.php';
    4547        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-storespot-api.php';
    4648        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-storespot-events.php';
    4749        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-storespot-facebook-pixel.php';
    48         $this->loader = new StoreSpot_Loader();
     50
     51        if(
     52            ! class_exists( 'StoreSpot_Loader' ) ||
     53            ! class_exists( 'StoreSpot_Product_Feed' ) ||
     54            ! class_exists( 'StoreSpot_Messages' ) ||
     55            ! class_exists( 'StoreSpot_API' ) ||
     56            ! class_exists( 'StoreSpot_Events' ) ||
     57            ! class_exists( 'StoreSpot_Facebook_Pixel' )
     58        ) {
     59            return false;
     60        } else {
     61            $this->loader = new StoreSpot_Loader();
     62            return true;
     63        }
    4964    }
    5065
  • storespot/tags/1.0.8/public/class-storespot-facebook-pixel.php

    r1957373 r1969690  
    1212    public function pixel_code() {
    1313        return sprintf("
     14<!-- StoreSpot Facebook Integration Begin --->
    1415<script type='text/javascript'>
    1516!function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?
     
    2122fbq('track', 'PageView');
    2223</script>
     24<!-- StoreSpot Facebook Integration End --->
    2325",
    2426        self::get_pixel_id()
  • storespot/tags/1.0.8/readme.txt

    r1957373 r1969690  
    55Tested up to: 4.9
    66Requires PHP: 5.6
    7 Stable tag: 1.0.7
     7Stable tag: 1.0.8
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    5050== Changelog ==
    5151
     52= 1.0.8 =
     53* Improve memory usage in feed generation
     54
    5255= 1.0.7 =
    5356* Compatibility with Facebook for WooCommerce plugin
  • storespot/tags/1.0.8/storespot.php

    r1957373 r1969690  
    44 * Plugin URI:   https://storespot.io/
    55 * Description:  Stop leaving money on the table. Automate your retargeting ads with StoreSpot.
    6  * Version:      1.0.7
     6 * Version:      1.0.8
    77 * Author:       StoreSpot
    88**/
     
    1111if ( ! defined( 'WPINC' ) ) { die; }
    1212
    13 define( 'STORESPOT_VERSION', '1.0.7' );
     13define( 'STORESPOT_VERSION', '1.0.8' );
    1414
    1515function activate_storespot() {
  • storespot/trunk/admin/class-storespot-api.php

    r1955784 r1969690  
    5858    public function get_storespot_settings($request) {
    5959        if ( wp_next_scheduled( 'stsp_product_feed_update' ) ) {
    60             $cronjob = wp_next_scheduled( 'stsp_product_feed_update' );
     60            $cronjob = date(
     61                'Y-m-d h:i:s',
     62                wp_next_scheduled( 'stsp_product_feed_update' )
     63            );
    6164        } else {
    6265            $cronjob = false;
    6366        }
    6467
     68        if ( ! function_exists( 'get_plugins' ) ) {
     69            require_once ABSPATH . 'wp-admin/includes/plugin.php';
     70        }
     71
     72        $plugins = get_plugins();
     73        $plugins_view = array();
     74        foreach( $plugins as $plugin ) {
     75            array_push($plugins_view, array(
     76                'name'      => $plugin['Name'],
     77                'version' => $plugin['Version'],
     78            ));
     79        }
     80
    6581        $data = array(
    66             'cronjob' => $cronjob,
    67             'plugin_version' => STORESPOT_VERSION,
    68             'settings' => get_option( ' storespot_settings' ),
     82            'cronjob'               => $cronjob,
     83            'plugin_version'    => STORESPOT_VERSION,
     84            'settings'              => get_option( ' storespot_settings' ),
     85            'wp_version'            => get_bloginfo( 'version' ),
     86            'wc_version'            => get_option( 'woocommerce_version' ),
     87            'plugins'               => $plugins_view,
    6988        );
     89
    7090        $response = rest_ensure_response($data);
    7191        $response->set_status(200);
  • storespot/trunk/includes/class-storespot.php

    r1957373 r1969690  
    3131    public function init() {
    3232        if ( class_exists( 'WC_Integration' ) ) {
    33             $this->load_dependencies();
    34             $this->define_admin_hooks();
    35             $this->define_public_hooks();
    36             $this->define_api_hooks();
    37             $this->run();
     33            $loaded = $this->load_dependencies();
     34            if( $loaded ) {
     35                $this->define_admin_hooks();
     36                $this->define_public_hooks();
     37                $this->define_api_hooks();
     38                $this->run();
     39            }
    3840        }
    3941    }
     
    4143    private function load_dependencies() {
    4244        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-storespot-loader.php';
    43         require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-storespot-product-feed.php';
     45        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-storespot-productfeed.php';
    4446        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-storespot-messages.php';
    4547        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-storespot-api.php';
    4648        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-storespot-events.php';
    4749        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-storespot-facebook-pixel.php';
    48         $this->loader = new StoreSpot_Loader();
     50
     51        if(
     52            ! class_exists( 'StoreSpot_Loader' ) ||
     53            ! class_exists( 'StoreSpot_Product_Feed' ) ||
     54            ! class_exists( 'StoreSpot_Messages' ) ||
     55            ! class_exists( 'StoreSpot_API' ) ||
     56            ! class_exists( 'StoreSpot_Events' ) ||
     57            ! class_exists( 'StoreSpot_Facebook_Pixel' )
     58        ) {
     59            return false;
     60        } else {
     61            $this->loader = new StoreSpot_Loader();
     62            return true;
     63        }
    4964    }
    5065
  • storespot/trunk/public/class-storespot-facebook-pixel.php

    r1957373 r1969690  
    1212    public function pixel_code() {
    1313        return sprintf("
     14<!-- StoreSpot Facebook Integration Begin --->
    1415<script type='text/javascript'>
    1516!function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?
     
    2122fbq('track', 'PageView');
    2223</script>
     24<!-- StoreSpot Facebook Integration End --->
    2325",
    2426        self::get_pixel_id()
  • storespot/trunk/readme.txt

    r1957373 r1969690  
    55Tested up to: 4.9
    66Requires PHP: 5.6
    7 Stable tag: 1.0.7
     7Stable tag: 1.0.8
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    5050== Changelog ==
    5151
     52= 1.0.8 =
     53* Improve memory usage in feed generation
     54
    5255= 1.0.7 =
    5356* Compatibility with Facebook for WooCommerce plugin
  • storespot/trunk/storespot.php

    r1957373 r1969690  
    44 * Plugin URI:   https://storespot.io/
    55 * Description:  Stop leaving money on the table. Automate your retargeting ads with StoreSpot.
    6  * Version:      1.0.7
     6 * Version:      1.0.8
    77 * Author:       StoreSpot
    88**/
     
    1111if ( ! defined( 'WPINC' ) ) { die; }
    1212
    13 define( 'STORESPOT_VERSION', '1.0.7' );
     13define( 'STORESPOT_VERSION', '1.0.8' );
    1414
    1515function activate_storespot() {
Note: See TracChangeset for help on using the changeset viewer.