Plugin Directory

Changeset 2048899


Ignore:
Timestamp:
03/12/2019 09:54:37 AM (7 years ago)
Author:
hoversignal
Message:

delete php tag

Location:
hoversignal/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • hoversignal/trunk/init.php

    r1963581 r2048899  
    44Plugin URI: https://ru.wordpress.org/plugins/hoversignal/
    55Description: HoverSignal adds interactive onsite notifications to your storefront. They display recent orders, on-site activity, products left in stock and a variety of other customer behaviors. You can also grow your email list with newsletter and sales timer notifications.
    6 Version: 1.0.1
     6Version: 1.0.3
    77Author: hoversignal
    88Author URI: https://hoversignal.com
     
    112112            foreach($order->get_items() as $item) {
    113113                $product = $item->get_product();
    114                 $images_arr = wp_get_attachment_image_src( $product->get_image_id(), array('72', '72'), false );
    115                 $image = null;
    116                 if($images_arr !== null && $images_arr[0] !== null) $image = $images_arr[0];
     114                if($product->get_image_id()) {
     115                    $images_arr = wp_get_attachment_image_src( $product->get_image_id(), array('72', '72'), false );
     116                    $image = null;
     117                    if($images_arr !== null && $images_arr[0] !== null) $image = $images_arr[0];
     118                } else {
     119                    $image = "";
     120                }
    117121               
    118122                $productArr = array(
     
    143147        foreach($items as $item) {
    144148            $product = $item->get_product();
    145             $images_arr = wp_get_attachment_image_src( $product->get_image_id(), array('72', '72'), false );
    146             $image = null;
    147             if($images_arr !== null && $images_arr[0] !== null) $image = $images_arr[0];
     149            if($product->get_image_id()) {
     150                $images_arr = wp_get_attachment_image_src( $product->get_image_id(), array('72', '72'), false );
     151                $image = null;
     152                if($images_arr !== null && $images_arr[0] !== null) $image = $images_arr[0];
     153            } else {
     154                $image = "";
     155            }
    148156           
    149157            $productArr = array(
     
    304312    }
    305313   
     314    /* Set the HS script in the head */
    306315    public function hoversignal_set_script()
    307316    {
     
    330339            s.type = "text/javascript";
    331340            s.async = true;
    332             s.src = "https://app.hoversignal.com/Api/SignalScript/<?=$scriptKey['scriptId']?>";
     341            s.src = "https://app.hoversignal.com/Api/Script/<?=$scriptKey['scriptId']?>";
    333342            if (w.opera == "[object Opera]") {
    334343            d.addEventListener("DOMContentLoaded", f, false);
     
    343352
    344353new HoverSignal();
    345 ?>
  • hoversignal/trunk/readme.txt

    r2022541 r2048899  
    55Requires at least: 4
    66Tested up to: 4.9.8
    7 Stable tag: 1.0.2
     7Stable tag: 1.0.3
    88
    99== Description ==
     
    6363 == Changelog ==
    6464 
    65  1.0.0 - preview verion
     65 1.0.0 - preview version
    6666 1.0.1 - change name
    6767 1.0.2 - image verification
     68 1.0.3 - delete last php tag
Note: See TracChangeset for help on using the changeset viewer.