Plugin Directory

Changeset 3267013


Ignore:
Timestamp:
04/04/2025 04:12:37 PM (11 months ago)
Author:
hippooo
Message:

1.0.8

Location:
hippoo-ticket/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • hippoo-ticket/trunk/app/hooks.php

    r3265917 r3267013  
    114114        'labels'             => $labels,
    115115        'public'             => false,
     116        'menu_icon'          => hippoo_ticket_url . 'images/icon.svg',
    116117        'publicly_queryable' => false,
    117118        'show_ui'            => true,
     
    120121        'rewrite'            => array( 'slug' => 'ticket' ),
    121122        'capability_type'    => 'post',
     123        'capabilities'       => array(
     124            'create_posts' => false,
     125        ),
     126        'map_meta_cap'       => true,
    122127        'has_archive'        => true,
    123128        'hierarchical'       => false,
    124129        'menu_position'      => null,
    125         'supports'           => array( 'title','editor','author'),
     130        'supports'           => array( 'title','author'),
    126131    );
    127132
  • hippoo-ticket/trunk/app/utils.php

    r3265917 r3267013  
    4343    );
    4444    // phpcs:enable
    45        
     45   
    4646    if ( empty( $ticket_id ) ) {
    4747        $args = [
     
    5555        $ticket_id = wp_insert_post( $args );
    5656    }
    57        
     57   
    5858    if ( empty( $ticket_id ) ) {
    5959        return array(
     
    6262        );
    6363    }
    64        
     64   
    6565    wp_update_post( [ 'ID' => $ticket_id, 'post_status' => ( $type == 1 ? 'hippoo_waiting' : 'hippoo_answered' ) ] );
    6666   
     
    9090            "message"         => "Unable to insert hippoo ticket"
    9191        );
     92    }
     93
     94    if ( $type == 1 ) {
     95        hippoo_ticket_send_notification_by_ticket( $ticket_id );
    9296    }
    9397   
     
    272276    return $attachment_ids;
    273277}
     278
     279function hippoo_ticket_send_notification_by_ticket( $ticket_id )
     280{
     281    global $wpdb;
     282
     283    $home_url = home_url();
     284    $parsed_url = wp_parse_url( $home_url );
     285    $cs_hostname = $parsed_url['host'];
     286
     287    $ticket = hippoo_ticket_get_ticket( $ticket_id );
     288   
     289    if ( empty( $ticket ) ) return;
     290
     291    $title = $ticket->post_title;
     292
     293    // phpcs:disable WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching
     294    $content = $wpdb->get_var(
     295        $wpdb->prepare(
     296            "SELECT content FROM {$wpdb->prefix}hippoo_ticket WHERE pid = %d ORDER BY id DESC",
     297            esc_sql( $ticket_id )
     298        )
     299    );
     300    // phpcs:enable
     301
     302    $url = "hippoo://app/tickets/?ticket_id=" . $ticket_id;
     303   
     304    $args = array(
     305        'body' => array(
     306            'cs_hostname' => $cs_hostname,
     307            'notif_data'  => array(
     308                'title'   => $title,
     309                'content' => $content,
     310                // 'url'     => $url
     311            )
     312        )
     313    );
     314   
     315    $response = wp_remote_post( hippoo_proxy_notifiction_url, $args );
     316
     317    if ( ! is_wp_error( $response ) ) {
     318        return wp_remote_retrieve_body( $response );
     319    }
     320}
  • hippoo-ticket/trunk/app/web_api_auth.php

    r3265917 r3267013  
    1111
    1212        );
    13         register_rest_route( 'wc-hippoo/v1', 'wp/tickets', $args_hippoo_ticket_insert);
     13        register_rest_route( 'wc-hippoo/v1', 'wp/tickets', $args_hippoo_ticket_insert );
    1414
    1515        #
     
    2525
    2626        );
    27         register_rest_route( 'wc-hippoo/v1', 'wp/tickets', $args_hippoo_ticket_list);
     27        register_rest_route( 'wc-hippoo/v1', 'wp/tickets', $args_hippoo_ticket_list );
    2828
    2929        #
  • hippoo-ticket/trunk/assets/js/admin-script.js

    r3265917 r3267013  
    11jQuery(document).ready(function($) {
    2     $('a[href="post-new.php?post_type=hippoo_ticket"]').hide();
    32    $('a.page-title-action').hide();
    43});
  • hippoo-ticket/trunk/hippoo-ticket.php

    r3265917 r3267013  
    22/**
    33 * Plugin Name: Hippoo Ticket
    4  * Version: 1.0.7
     4 * Version: 1.0.8
    55 * Plugin URI: https://Hippoo.app/
    66 * Description: A Free WooCommerce Plugin for Seamless Customer Support and support ticket.
     
    2828if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly     
    2929
    30 define( 'hippoo_ticket_version', '1.0.7' );
     30define( 'hippoo_ticket_version', '1.0.8' );
    3131define( 'hippoo_ticket_path', plugin_dir_path( __FILE__ ) );
    3232define( 'hippoo_ticket_url', plugin_dir_url( __FILE__ ) . 'assets/' );
     
    9898    global $menu, $wpdb;
    9999
    100     // add_submenu_page('edit.php?post_type=hippoo_ticket','Settings','Settings','administrator','hippoo_ticket_con_ticket','hippoo_ticket_con_ticket');
    101     add_menu_page(
    102         __( 'Hippoo Ticket', 'hippoo-ticket' ),
    103         __( 'Hippoo Ticket', 'hippoo-ticket' ),
    104         'manage_options',
    105         'hippoo_ticket',
    106         'hippoo_ticket_config_page',
    107         hippoo_ticket_url . 'images/icon.svg'
    108     );
     100    add_submenu_page(
     101        'edit.php?post_type=hippoo_ticket',
     102        __( 'Settings', 'hippoo-ticket' ),
     103        __( 'Settings', 'hippoo-ticket' ),
     104        'manage_options',
     105        'hippoo_ticket',
     106        'hippoo_ticket_config_page'
     107    );
    109108
    110109    // phpcs:disable WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching
     
    167166
    168167add_action( 'add_meta_boxes', 'hippoo_ticket_register_meta_boxes');
     168
     169function hippoo_ticket_define_constants() {
     170    if ( ! defined( 'hippoo_proxy_notifiction_url' ) ) {
     171        define( 'hippoo_proxy_notifiction_url', 'https://hippoo.app/wp-json/woohouse/v1/fb/proxy_notification' );
     172    }
     173}
     174
     175add_action( 'init', 'hippoo_ticket_define_constants' );
  • hippoo-ticket/trunk/readme.txt

    r3265917 r3267013  
    55Requires at least: 5.3
    66Tested up to: 6.7
    7 Stable tag: 1.0.7
     7Stable tag: 1.0.8
    88License: GPL3
    99License URI: https://www.gnu.org/licenses/gpl-3.0.html
     
    1111== Description ==
    1212
    13 <!-- wp:paragraph -->
    14 <p><strong>Hippoo-Ticket: A Free WooCommerce Plugin for Seamless Customer Support</strong></p>
    15 <!-- /wp:paragraph -->
     13**Hippoo-Ticket: A Free WooCommerce Plugin for Seamless Customer Support**
    1614
    17 <!-- wp:paragraph -->
    18 <p>Enhance your WooCommerce shop's customer support experience with Hippoo-Ticket, a free plugin designed to streamline communication between you and your customers. With Hippoo-Ticket, customers can easily submit support tickets directly from your online store (in order list), and as a shop owner, you can provide prompt responses for efficient and effective support.</p>
    19 <!-- /wp:paragraph -->
     15Hippoo-Ticket **adds a support ticket button** to the **WooCommerce "My Account" page**, allowing customers to easily communicate with shop owners and request support. Shop owners can **reply to tickets directly from the WordPress dashboard** or, if they have the [Hippoo WooCommerce app](https://hippoo.app) installed, they can manage tickets inside the app without needing to open the dashboard.
    2016
    21 <!-- wp:paragraph -->
    22 <p>Hippoo-Ticket offers the flexibility to manage support tickets both from the Hippoo app and directly within your WordPress dashboard. While the <strong><a href="https://hippoo.app">Hippoo app</a></strong> provides convenient mobile access to tickets on the go, you can also handle and respond to customer inquiries directly from your familiar WordPress environment.</p>
    23 <!-- /wp:paragraph -->
     17### **How It Works:**
     18- Customers can submit support tickets related to their orders from their **My Account page** in WooCommerce. 
     19- Shop owners can manage and respond to these tickets inside their **WordPress dashboard** or using the [Hippoo WooCommerce app](https://hippoo.app). 
     20- Both **customers and shop owners** can **upload and send images** as part of their support conversation. 
     21- The ticket **template is customizable**, so you can tailor it to fit your brand's style and workflow. 
    2422
    25 <!-- wp:paragraph -->
    26 <p><strong>Key Features of Hippoo-Ticket:</strong></p>
    27 <!-- /wp:paragraph -->
     23### **Key Features of Hippoo-Ticket:**
     241. **Support Ticket Submission:** Customers can effortlessly submit support tickets regarding their orders directly from the WooCommerce store. 
     252. **Efficient Communication:** Seamlessly manage and respond to support tickets, ensuring timely and effective customer support. 
     263. **Mobile and Desktop Access:** Access and respond to support tickets using the **WordPress dashboard** or the **[Hippoo WooCommerce app](https://hippoo.app)**. 
     274. **Image Uploads:** Both customers and shop owners can **send images** within the support conversation. 
     285. **Push Notifications:** If you purchase the **Hippoo ticket Extension** inside the [Hippoo WooCommerce app](https://hippoo.app), you'll receive real-time notifications for **new customer tickets and replies**. 
     296. **Customizable Templates:** Modify the ticket template to match your store’s design and branding. 
    2830
    29 <!-- wp:list {"ordered":true} -->
    30 <ol><!-- wp:list-item -->
    31 <li>Support Ticket Submission: Customers can effortlessly submit support tickets regarding their orders directly from your WooCommerce store.</li>
    32 <!-- /wp:list-item -->
    33 
    34 <!-- wp:list-item -->
    35 <li>Efficient Communication: Seamlessly manage and respond to support tickets, ensuring timely and effective customer support.</li>
    36 <!-- /wp:list-item -->
    37 
    38 <!-- wp:list-item -->
    39 <li>Mobile and Desktop Access: Access and respond to support tickets using the Hippoo Android,iOS app or directly from your WordPress dashboard.</li>
    40 <!-- /wp:list-item -->
    41 
    42 <!-- wp:list-item -->
    43 <li>Streamlined Workflow: Stay organized with a centralized system for managing customer inquiries, allowing you to prioritize and address tickets efficiently.</li>
    44 <!-- /wp:list-item --></ol>
    45 <!-- /wp:list -->
    46 
    47 <!-- wp:paragraph -->
    48 <p>Enhance your customer support workflow with Hippoo-Ticket, whether you prefer the convenience of the <strong><a href="https://hippoo.app">Hippoo app</a></strong> or the familiarity of the WordPress dashboard. Install Hippoo-Ticket now and provide exceptional support to your valued customers.</p>
    49 <!-- /wp:paragraph -->
     31Enhance your customer support workflow with Hippoo-Ticket, whether you prefer the **convenience of the [Hippoo WooCommerce app](https://hippoo.app)** or the familiarity of the **WordPress dashboard**. Install Hippoo-Ticket now and provide exceptional support to your valued customers.
    5032
    5133== Third-Party Service Usage ==
     
    5335This plugin utilizes the following third-party services:
    5436
     37### Hippoo Central Web Service:
     38- **Purpose:** Retrieving a list of compatible products from our central Hippoo website, which this plugin can work with. 
     39- **Service Endpoint:** Hippoo Central Web Service 
     40- **Terms of Use and Privacy Policy:** Hippoo Website Terms of Use and Privacy Policy 
    5541
    56 Hippoo Central Web Service:
    57 <!-- wp:paragraph -->
    58 <p>
    59 Purpose: Retrieving a list of compatible products from our central Hippoo website, which this plugin can work with.
    60 Service Endpoint: Hippoo Central Web Service
    61 Terms of Use and Privacy Policy: Hippoo Website Terms of Use and Privacy Policy
    62 </p>
    63 <!-- /wp:paragraph -->
    64 
    65 Barcode Generation Service:
    66 <!-- wp:paragraph -->
    67 <p>
    68 Purpose: Generating QR codes to enable users to scan the code from their mobile devices.
    69 Service Endpoint: Barcode Generator
    70 Terms of Use and Privacy Policy: TEC-IT Barcode Generator Terms of Use and Privacy Policy
    71 Legal Considerations:
    72 None of the aforementioned services store any information.
    73 </p>
    74 <!-- /wp:paragraph -->
    75 
    76 <!-- wp:paragraph -->
    7742We understand the importance of transparency when it comes to utilizing third-party services. This documentation is provided to ensure that users are fully aware of how and why external services are utilized within this plugin. If you have any concerns or questions regarding the usage of these services, please feel free to contact us.
    78 <!-- /wp:paragraph -->
    7943
    8044== Installation ==
    8145
    82 1. Upload the plugin folder to the `/wp-content/plugins/` directory
    83 2. Activate the plugin through the 'Plugins' menu in WordPress
     461. Upload the plugin folder to the `/wp-content/plugins/` directory 
     472. Activate the plugin through the 'Plugins' menu in WordPress 
    8448
    8549== Screenshots ==
    8650
    87 1. Hippoo main dashboard in the app
    88 2. Hippoo Ticket list in the app
    89 3. Hippoo Ticket conversation example
    90 
     511. Hippoo main dashboard in the app 
     522. Hippoo Ticket list in the app 
     533. Hippoo Ticket conversation example 
    9154
    9255== Changelog ==
    93 * 1.0.7 - Minor Improvements.
    94 * 1.0.1 Hippoo app auth
    95 * 1.0 Hippos-ticket launch
     56
     57### 1.0.8
     58- **Added push notification feature** 
     59- **Ability to customize notification templates** 
     60- **Visual improvements** 
     61
     62### 1.0
     63- **Hippoo-Ticket launch**
Note: See TracChangeset for help on using the changeset viewer.