Plugin Directory

Changeset 3418382


Ignore:
Timestamp:
12/12/2025 03:16:24 PM (4 weeks ago)
Author:
dan009
Message:

2025-12-12

  • Tested with Wordpress 6.9
  • Added index to column 'deleted' in main table
  • Added QR code tab for premium display
  • Added slider option checkbox in the product page - premium display
Location:
raffle-play-woo/trunk
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • raffle-play-woo/trunk/includes/RafflePlayWoo_LifeCycle.php

    r3391281 r3418382  
    2222include_once('w/W_RafflePlayWoo_Lucky.php');
    2323include_once('w/W_RafflePlayWoo_Logs.php');
     24include_once('w/W_RafflePlayWoo_QrCode.php');
    2425
    2526use RafflePlayWoo_InstallIndicator\RafflePlayWoo_InstallIndicator as RafflePlayWoo_InstallIndicator;
     
    3940use W_RafflePlayWoo_Lucky\W_RafflePlayWoo_Lucky as Lucky;
    4041use W_RafflePlayWoo_Logs\W_RafflePlayWoo_Logs as Logs;
     42use W_RafflePlayWoo_QrCode\W_RafflePlayWoo_QrCode as QrCode;
    4143
    4244
     
    187189        $this->addRafflePromotionPage();
    188190        $this->addRaffleLuckyPage(); 
    189         $this->addRaffleReportsPage();
     191        $this->addRaffleQrCode();
     192        $this->addRaffleReportsPage();         
    190193        $this->addRaffleInstructionsPage();   
    191194        $this->addRaffleReleasesPage();   
     
    240243    protected function getPluginReleasesSlug(){
    241244        return  'Raffle_raffle_play_releases';
     245    }
     246
     247    protected function getPluginQrCodeSlug(){
     248        return 'raffle-play-qrcode';
    242249    }
    243250
     
    328335                                          array( &$this, 'drp_lucky_page'),
    329336                                          173
     337                        );
     338    }
     339
     340    protected function addRaffleQrCode(){
     341        global $rpwoo_qrcode_page;
     342        $displayName = esc_html__('QR Code', 'raffle-play-woo' );         
     343
     344        $rpwoo_qrcode_page = add_submenu_page( $this->getPluginSlug(),
     345                                          $displayName,
     346                                          $displayName,
     347                                          'manage_options',
     348                                          $this->getPluginQrCodeSlug(),
     349                                          array( &$this, 'drp_qrcode_page'),
     350                                          176
    330351                        );
    331352    }
     
    14261447                        )
    14271448                );
     1449
     1450                $checkbox_slider = array(
     1451                    'label' => esc_html__('Show Raffle Tickets Slider in the Product & Cards Shop page (***Premium FEATURE***)', 'raffle-play-woo') . '<a href="https://youtu.be/KZ_bSUylgVs" target="_blank"> Watch Setup Video </a>', // Text in Label
     1452                    'class' => '',
     1453                    'style' => '',
     1454                    'wrapper_class' => '',       
     1455                    'id' => 'raffle_ckb_slider',
     1456                    'name' => 'raffle_ckb_slider',     
     1457                    'desc_tip' => '',
     1458                    'custom_attributes' => '',
     1459                    'description' => esc_html__('Show raffle tickets slider in the product page', 'raffle-play-woo')
     1460                );
    14281461           
    14291462                $raffles = $this->get_simple_raffles();
     
    14411474                }
    14421475
    1443                 woocommerce_wp_checkbox( $checkbox_raffle );
    1444                 woocommerce_wp_text_input( $no_of_tickets );
     1476                woocommerce_wp_checkbox( $checkbox_raffle );
     1477                woocommerce_wp_text_input( $no_of_tickets );
     1478                 
     1479                if( $product_object->get_type() != 'variable'){
     1480                    woocommerce_wp_checkbox( $checkbox_slider );
     1481                }
    14451482                woocommerce_wp_select( $raffle_type );
    14461483
     
    21312168    }
    21322169
     2170    public function drp_qrcode_page(){
     2171
     2172        if ( is_user_logged_in() &&
     2173            current_user_can( 'manage_options' )  &&
     2174            is_admin() ) {
     2175   
     2176                $settings = array(
     2177                );                         
     2178
     2179                QrCode::drp_qrCodePage( $settings ); 
     2180
     2181            }
     2182    }
     2183
    21332184}
  • raffle-play-woo/trunk/includes/RafflePlayWoo_Plugin.php

    r3391281 r3418382  
    6363                    KEY catid_two (catid_two),
    6464                    KEY order_status (order_status),
     65                    key deleted (deleted),
    6566                    KEY created_at (created_at),
    6667                    KEY live_order (live_order),
     
    290291        } catch (\Throwable $th) {
    291292            RafflePlayWoo_error_log( 'Raffle Play woo - Error adding column reserved - ' . $th->getMessage() );           
     293        }
     294
     295        //add index to deleted column
     296        try {
     297            $del_index_columns = $wpdb->get_results(" SHOW INDEX FROM {$table_main} WHERE key_name = 'deleted'; ");
     298            if( count( $del_index_columns ) == 0) {
     299                $wpdb->query("ALTER TABLE {$table_main} ADD KEY deleted (deleted)");
     300            }
     301        } catch (\Throwable $th) {
     302            RafflePlayWoo_error_log( 'Raffle Play woo - Error adding key to deleted - ' . $th->getMessage() );   
    292303        }
    293304   
     
    528539        global $rpwoo_lucky_page;
    529540        global $rpwoo_logs_page;
     541        global $rpwoo_qrcode_page;
    530542
    531543        if( $hook === 'edit.php'){
     
    539551            ($rpwoo_winners_page != $hook ) && ( $rpwoo_releases_page != $hook ) &&
    540552            ($rpwoo_promotion_page != $hook )  && ( $rpwoo_lucky_page != $hook ) &&
    541             ($rpwoo_logs_page != $hook ) )
     553            ($rpwoo_logs_page != $hook ) && ( $rpwoo_qrcode_page != $hook ) )
    542554            return;
    543555
  • raffle-play-woo/trunk/includes/w/W_RafflePlayWoo_Releases.php

    r3352657 r3418382  
    3535                            <div class="tab-pane fade active show" id="v-pills-release221" role="tabpanel"
    3636                                aria-labelledby="v-pills-release221-tab"> 
     37
     38                                <?php
     39                                    include_once( RAFFLE_PLAY_WOO_DIR_PATH . '/includes/releases/RafflePlayWoo_Release_251.php');
     40                                ?>                               
    3741                               
    3842                                <?php
  • raffle-play-woo/trunk/raffle-play-woo.php

    r3391281 r3418382  
    44* Requires Plugins: woocommerce
    55* Plugin URI: https://tuskcode.com
    6 * Version: 2.5.0
     6* Version: 2.5.1
    77* Author: dan009
    88* Author URI: https://tuskcode.com
     
    1818    die('No Access to this page');
    1919
    20 if( ! defined('RAFFLE_PLAY_WOO_VERSION')) define('RAFFLE_PLAY_WOO_VERSION', '2.5.0');
    21 if( ! defined('RAFFLE_PLAY_WOO_WP_TESTED')) define('RAFFLE_PLAY_WOO_WP_TESTED', '6.8');
     20if( ! defined('RAFFLE_PLAY_WOO_VERSION')) define('RAFFLE_PLAY_WOO_VERSION', '2.5.1');
     21if( ! defined('RAFFLE_PLAY_WOO_WP_TESTED')) define('RAFFLE_PLAY_WOO_WP_TESTED', '6.9');
    2222if( ! defined('RAFFLE_PLAY_WOO_URL')) define( 'RAFFLE_PLAY_WOO_URL', esc_url( plugins_url( '', __FILE__ ) ) );
    2323if( ! defined('RAFFLE_PLAY_WOO_DIR_PATH') ) define('RAFFLE_PLAY_WOO_DIR_PATH', plugin_dir_path( __FILE__ ));
    2424if( ! defined('RAFFLE_PLAY_WOO_LOG_FILE')) define( 'RAFFLE_PLAY_WOO_LOG_FILE', RAFFLE_PLAY_WOO_DIR_PATH . 'logs/RafflePlayWoo_error.log' );
    2525
    26 function RafflePlayWoo_RaffleNotLicensed(){
    27     echo '<div class="notice notice-error is-dismissible"><strong>' .
    28     esc_html__( 'Raffle Play Woo', 'raffle-play-woo' ). '<br/>' .
    29     esc_html__( 'The plugin is not licensed', 'raffle-play-woo' ) .' </strong></div>';
    30 }
    3126
    3227function RafflePlayWoo_NoticeWoocommerceNotInstalled(){   
     
    3429        esc_html__( 'Raffle Play Woo', 'raffle-play-woo' ). '<br/>' .
    3530        esc_html__( ' WooCommerce is not installed/active', 'raffle-play-woo' ) .' </strong></div>';
    36 }
    37 
    38 function RafflePlayWoo_InvalidLicense(){
    39     echo '<div class="notice notice-warning is-dismissible"><p><strong>' .
    40     esc_html__( 'Raffle Play Woo', 'raffle-play-woo' ). ' - ' .
    41     esc_html__( 'Your license is not valid', 'raffle-play-woo' ) .' </strong></p></div>'; 
    4231}
    4332
  • raffle-play-woo/trunk/readme.txt

    r3391281 r3418382  
    44Tags: raffle, lottery, contest, giveaway, raffle tickets, raffle generator, woocommerce raffle
    55Requires at least: 5.0.1
    6 Tested up to: 6.8
    7 Stable tag: 2.5.0
     6Tested up to: 6.9
     7Stable tag: 2.5.1
    88Requires PHP: 5.2
    99License: GPLv2 or later
     
    3737
    3838== Changelog ==
     39
     40= 2025-12-12
     41* Tested with Wordpress 6.9
     42* Added index to column 'deleted' in main table
     43* Added QR code tab for premium display
     44* Added slider option checkbox in the product page - premium display
    3945
    4046= 2025-11-06
Note: See TracChangeset for help on using the changeset viewer.