Plugin Directory

Changeset 1660249


Ignore:
Timestamp:
05/18/2017 02:33:36 PM (9 years ago)
Author:
loushou
Message:
  • [new] added filter to run function checking if a report can run
  • [fix] solved issue where ticket products were not being hidden from shop. must resave each product to resolve
  • [fix] resolving order notes issue
  • [fix] fixing product search for event ticket setup

loushou

Location:
opentickets-community-edition/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • opentickets-community-edition/trunk/inc/core/event-reporting.class.php

    r1634310 r1660249  
    209209    // verify that we should be running the report right now, based on the submitted data
    210210    protected function _verify_run_report( $only_orig=false ) {
     211        $run = true;
    211212        // if the nonce or report name is not set, bail
    212213        if ( ! isset( $_REQUEST['_n'], $_REQUEST['sa'] ) )
    213             return false;
     214            $run = false;
    214215
    215216        // if the report name does not match this report, bail
    216         if ( $_REQUEST['sa'] !== $this->slug )
    217             return false;
     217        if ( isset( $_REQUEST['sa'] ) && $_REQUEST['sa'] !== $this->slug )
     218            $run = false;
    218219
    219220        // if the nonce does not match, then bail
    220         if ( ! wp_verify_nonce( $_REQUEST['_n'], 'do-qsot-admin-report-ajax' ) )
    221             return false;
    222 
     221        if ( isset( $_REQUEST['_n'] ) && ! wp_verify_nonce( $_REQUEST['_n'], 'do-qsot-admin-report-ajax' ) )
     222            $run = false;
     223
     224        // if the extra function is false, then fail to run
     225        if ( ! $this->_extra_verify_run_report( $only_orig ) )
     226            $run = false;
     227
     228        return apply_filters( 'qsot-user-can-run-report-' . $this->group_slug, $run, $only_orig, $this );;
     229    }
     230
     231    // extra logic to see if the user can run the report
     232    protected function _extra_verify_run_report( $only_orig=false ) {
    223233        return true;
    224234    }
  • opentickets-community-edition/trunk/inc/sys/ajax.php

    r1634310 r1660249  
    258258    public function aj_find_product( $resp ) {
    259259        // get the search string
    260         $search = isset( $_REQUEST['q'] ) ? $_REQUEST['q'] : '';
     260        $search = isset( $_REQUEST['q'], $_REQUEST['q']['term'] ) ? $_REQUEST['q']['term'] : '';
    261261
    262262        // setup serch args
     
    265265            'post_status' => array( 'publish' ),
    266266            'perm' => 'readable',
    267             'posts_per_page' -1,
     267            'posts_per_page' => -1,
     268            'offset' => 0,
    268269            'meta_query' => array(
    269270                array( 'key' => '_sku', 'value' => $search, 'compare' => 'LIKE' ),
     
    285286            'post_status' => array( 'publish' ),
    286287            'perm' => 'readable',
    287             'posts_per_page' -1,
     288            'posts_per_page' => -1,
     289            'offset' => 0,
    288290            's' => $search,
    289291            'fields' => 'ids',
  • opentickets-community-edition/trunk/inc/ticket/product.class.php

    r1647408 r1660249  
    181181        // all ticket products should be hidden from the frontend shop. they should only be purchaseable via the ticket selection UI, because otherwise no event will be associated with it
    182182        if ( $is_ticket == 'yes' ) {
    183             if ( version_compare( '3.0.0', WC_VERSION ) >= 0 ) {
     183            if ( version_compare( '3.0.0', WC_VERSION ) <= 0 ) {
    184184                wp_set_object_terms( $post_id, array( 'exclude-from-search', 'exclude-from-catalog' ), 'product_visibility', false );
    185185            } else {
  • opentickets-community-edition/trunk/launcher.php

    r1651655 r1660249  
    44 * Plugin URI:  http://opentickets.com/
    55 * Description: Event Management and Online Ticket Sales Platform
    6  * Version:     2.8.3
     6 * Version:     2.8.4
    77 * Author:      Quadshot Software LLC
    88 * Author URI:  http://quadshot.com/
     
    5555            'fctm' => 'fc',
    5656            'always_reserve' => 0,
    57             'version' => '2.8.3',
     57            'version' => '2.8.4',
    5858            'min_wc_version' => '2.6.14',
    5959            'core_post_type' => 'qsot-event',
  • opentickets-community-edition/trunk/readme.txt

    r1651655 r1660249  
    171171
    172172== Changelog ==
     173
     174= 2.8.4 - May/18/2017 =
     175* [new] added filter to run function checking if a report can run
     176* [fix] solved issue where ticket products were not being hidden from shop. must resave each product to resolve
     177* [fix] resolving order notes issue
     178* [fix] fixing product search for event ticket setup
    173179
    174180= 2.8.3 - May/5/2017 =
  • opentickets-community-edition/trunk/woocommerce/includes/admin/meta-boxes/class-wc-meta-box-order-notes.php

    r1340883 r1660249  
    2626        $args = array(
    2727            'post_id'   => $post->ID,
     28            'orderby'   => 'comment_ID',
     29            'order'     => 'DESC',
    2830            'approve'   => 'approve',
    29             'type'      => 'order_note'
     31            'type'      => 'order_note',
    3032        );
    3133
     
    4042        if ( $notes ) {
    4143
    42             foreach( $notes as $note ) {
     44            foreach ( $notes as $note ) {
    4345
    44                 $note_classes = get_comment_meta( $note->comment_ID, 'is_customer_note', true ) ? array( 'customer-note', 'note' ) : array( 'note' );
    45 
     46                $note_classes   = array( 'note' );
     47                $note_classes[] = get_comment_meta( $note->comment_ID, 'is_customer_note', true ) ? 'customer-note' : '';
     48                $note_classes[] = ( __( 'WooCommerce', 'woocommerce' ) === $note->comment_author ) ? 'system-note' : '';
     49                $note_classes   = apply_filters( 'woocommerce_order_note_class', array_filter( $note_classes ), $note );
    4650                ?>
    47                 <li rel="<?php echo absint( $note->comment_ID ) ; ?>" class="<?php echo implode( ' ', $note_classes ); ?>">
     51                <li rel="<?php echo absint( $note->comment_ID ); ?>" class="<?php echo esc_attr( implode( ' ', $note_classes ) ); ?>">
    4852                    <div class="note_content">
    4953                        <?php echo wpautop( wptexturize( wp_kses_post( $note->comment_content ) ) ); ?>
     
    5155                    <p class="meta">
    5256                        <abbr class="exact-date" title="<?php echo $note->comment_date; ?>"><?php printf( __( 'added on %1$s at %2$s', 'woocommerce' ), date_i18n( wc_date_format(), strtotime( $note->comment_date ) ), date_i18n( wc_time_format(), strtotime( $note->comment_date ) ) ); ?></abbr>
    53                         <?php if ( $note->comment_author !== __( 'WooCommerce', 'woocommerce' ) ) printf( ' ' . __( 'by %s', 'woocommerce' ), $note->comment_author ); ?>
    54                         <a href="#" class="delete_note"><?php _e( 'Delete note', 'woocommerce' ); ?></a>
     57                        <?php
     58                        if ( __( 'WooCommerce', 'woocommerce' ) !== $note->comment_author ) :
     59                            /* translators: %s: note author */
     60                            printf( ' ' . __( 'by %s', 'woocommerce' ), $note->comment_author );
     61                        endif;
     62                        ?>
     63                        <a href="#" class="delete_note" role="button"><?php _e( 'Delete note', 'woocommerce' ); ?></a>
    5564                    </p>
    5665                </li>
    5766                <?php
    5867            }
    59 
    6068        } else {
    6169            echo '<li>' . __( 'There are no notes yet.', 'woocommerce' ) . '</li>';
     
    6573        ?>
    6674        <div class="add_note">
    67             <h4><?php _e( 'Add note', 'woocommerce' ); ?> <?php echo wc_help_tip( __( 'Add a note for your reference, or add a customer note (the user will be notified).', 'woocommerce' ) ); ?></h4>
    6875            <p>
     76                <label for="add_order_note"><?php _e( 'Add note', 'woocommerce' ); ?> <?php echo wc_help_tip( __( 'Add a note for your reference, or add a customer note (the user will be notified).', 'woocommerce' ) ); ?></label>
    6977                <textarea type="text" name="order_note" id="add_order_note" class="input-text" cols="20" rows="5"></textarea>
    7078            </p>
    7179            <p>
     80                <label for="order_note_type" class="screen-reader-text"><?php _e( 'Note type', 'woocommerce' ); ?></label>
    7281                <?php
    7382                    $note_types = apply_filters( 'woocommerce_order_note_types', array(
     
    8190                    <?php endforeach; ?>
    8291                </select>
    83                 <a href="#" class="add_note button"><?php _e( 'Add', 'woocommerce' ); ?></a>
     92                <button type="button" class="add_note button"><?php _e( 'Add', 'woocommerce' ); ?></button>
    8493            </p>
    8594        </div>
Note: See TracChangeset for help on using the changeset viewer.