Plugin Directory

Changeset 3419419


Ignore:
Timestamp:
12/14/2025 03:39:08 PM (3 months ago)
Author:
wpxteam
Message:

v1.9.0: * Added: WPML & Polylang Support. * Updated: array to add product name to the add-to-cart button. * Updated: Stylesheet to apply plugin settings for table footer. * Update: All hooks follow the Plugin Check Plugin (PCP) WPCS coding standards. If you’ve added custom code using PVT php hooks/functions, please replace the pvt_ prefixes with pvtfw_. * Compatibility: WordPress 6.9 & WooCommerce 10.4.2.

Location:
product-variant-table-for-woocommerce
Files:
51 added
1 deleted
12 edited

Legend:

Unmodified
Added
Removed
  • product-variant-table-for-woocommerce/trunk/inc/class_pvtfw_common.php

    r3245832 r3419419  
    5656         * Get Setings as an object
    5757         * ====================================================
     58         *
     59         * @updated in 1.9.0
     60         *
     61         * Changed the values of-> `available_title_text`, `cart_btn_text`
     62         *
    5863         */
    5964        public static function pvtfw_get_options(){
     
    6469                'showTableHeader'   => get_option('pvtfw_variant_table_show_table_header', 'on'),
    6570                'showAvailableOptionBtn' => get_option('pvtfw_variant_table_show_available_options_btn', 'on'),
    66                 'available_btn_text' =>  get_option('pvtfw_variant_table_available_options_btn_text'),
     71                'available_btn_text' =>  self::get_translated_option( 'pvtfw_variant_table_available_options_btn_text', 'Available options' ),
    6772                'available_title_text' =>  get_option('pvtfw_variant_table_show_available_options_text', 'on'),
    6873                // previously was btn_text now cart_btn_text
    69                 'cart_btn_text'     =>  get_option('pvtfw_variant_table_cart_btn_text'),
     74                'cart_btn_text'     =>  self::get_translated_option( 'pvtfw_variant_table_cart_btn_text', 'Add To Cart' ),
    7075                'qty_layout'        => get_option('pvtfw_variant_table_qty_layout', 'plus/minus'),
    7176                'showSubTotal'      => get_option('pvtfw_variant_table_sub_total', ''),
     
    7883            );
    7984
    80             $pvt_option = apply_filters('all_pvt_options', $options);
     85            $pvt_option = apply_filters('pvtfw_all_options', $options);
    8186
    8287            return (object)$pvt_option;
     
    221226         */
    222227        public static function allowed_tags(){
    223             return apply_filters( 'pvt_allowed_tags', array(
     228            return apply_filters( 'pvtfw_allowed_tags', array(
    224229                'input' => array(
    225230                    'class' => array(),
     
    234239            ) );
    235240        }
     241
     242        /**
     243         * ================================================================
     244         * Register an option as a translatable string for WPML & Polylang.
     245         * ================================================================
     246         * @since 1.9.0
     247         */
     248        public static function register_translatable_option( $option_name, $default = '', $domain = 'product-variant-table-for-woocommerce' ) {
     249            $value = get_option( $option_name, $default );
     250
     251            // WPML
     252            if ( function_exists( 'icl_register_string' ) ) {
     253                icl_register_string( $domain, $option_name, $value );
     254            }
     255
     256            // Polylang
     257            if ( function_exists( 'pll_register_string' ) ) {
     258                pll_register_string( $option_name, $value, $domain );
     259            }
     260        }
    236261       
    237        
     262        /**
     263         * ================================================================
     264         * Get a translated option value using WPML or Polylang.
     265         * ================================================================
     266         *
     267         * @since 1.9.0
     268         *
     269         * @return Text/Translate Text
     270         */
     271        public static function get_translated_option( $option_name, $default = '', $domain = 'product-variant-table-for-woocommerce' ) {
     272            $value = get_option( $option_name, $default );
     273
     274            // WPML
     275            if ( function_exists( 'wpml_translate_single_string' ) ) {
     276                /**
     277                 * (Ignore this hook. It is a standard WPML hook.)
     278                 * phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound
     279                 */
     280                return apply_filters(
     281                    'wpml_translate_single_string',
     282                    $value,
     283                    $domain,
     284                    $option_name
     285                );
     286            }
     287
     288            // Polylang
     289            if ( function_exists( 'pll__' ) ) {
     290                return pll__( $value );
     291            }
     292
     293            return $value; // fallback
     294        }
     295
    238296
    239297    }
  • product-variant-table-for-woocommerce/trunk/inc/compatibility.php

    r3367988 r3419419  
    88 */
    99if ( class_exists('ReyCore') && PVTFW_COMMON::pvtfw_get_options()->cart_redirect == '' ):
    10     if( !function_exists('reycore_support') ):
    11         function reycore_support(){
     10    if( !function_exists('pvtfw_reycore_support') ):
     11        function pvtfw_reycore_support(){
    1212            return false;
    1313        }
    14         add_filter( 'pvtfw_added_cart_filter', 'reycore_support' );
     14        add_filter( 'pvtfw_added_cart_filter', 'pvtfw_reycore_support' );
    1515    endif;
    1616endif;
     
    5555
    5656
    57 if ( !function_exists( 'pvt_whols_plugin_support' ) && PVTFW_COMMON::check_plugin_state('whols') ){
     57if ( !function_exists( 'pvtfw_whols_plugin_support' ) && PVTFW_COMMON::check_plugin_state('whols') ){
    5858
    5959   
    6060
    61     function pvt_whols_plugin_support( $price_html, $single_variation ){
     61    function pvtfw_whols_plugin_support( $price_html, $single_variation ){
    6262
    6363        $whols_plugin_options = (array) get_option( 'whols_options' );
     
    8686
    8787    }
    88     add_filter( 'pvtfw_price_html', 'pvt_whols_plugin_support', 20, 2 );
     88    add_filter( 'pvtfw_price_html', 'pvtfw_whols_plugin_support', 20, 2 );
    8989
    9090}
     
    9898
    9999
    100 if ( !function_exists( 'pvt_get_price_html' ) ){
    101 
    102     function pvt_get_price_html( $price_html, $single_variation ){
     100if ( !function_exists( 'pvtfw_get_price_html' ) ){
     101
     102    function pvtfw_get_price_html( $price_html, $single_variation ){
    103103
    104104        /**
     
    112112
    113113    }
    114     add_filter( 'pvtfw_price_html', 'pvt_get_price_html', 10, 2 );
     114    add_filter( 'pvtfw_price_html', 'pvtfw_get_price_html', 10, 2 );
    115115
    116116}
     
    130130 */
    131131
    132 if( !function_exists( 'pvt_display_qty_field' ) ){
    133 
    134     function pvt_display_qty_field( $args ){
     132if( !function_exists( 'pvtfw_display_qty_field' ) ){
     133
     134    function pvtfw_display_qty_field( $args ){
    135135
    136136        // A class to disable quantity field for unavailable variation quantity field
     
    176176             */
    177177
    178             do_action( 'pvt_after_quantity_field_markup', $args );
     178            do_action( 'pvtfw_after_quantity_field_markup', $args );
    179179
    180180        }
     
    198198             */
    199199
    200             do_action( 'pvt_after_quantity_field_markup', $args );
    201 
    202         }
    203 
    204     }
    205 
    206     add_filter( 'pvt_print_qty_field', 'pvt_display_qty_field', 10, 1 );
     200            do_action( 'pvtfw_after_quantity_field_markup', $args );
     201
     202        }
     203
     204    }
     205
     206    add_filter( 'pvtfw_print_qty_field', 'pvtfw_display_qty_field', 10, 1 );
    207207
    208208}
     
    217217 */
    218218
    219 if( !function_exists( 'pvt_plus_minus_qty_input_markup' ) ){
    220 
    221     function pvt_plus_minus_qty_input_markup( $args ){
     219if( !function_exists( 'pvtfw_plus_minus_qty_input_markup' ) ){
     220
     221    function pvtfw_plus_minus_qty_input_markup( $args ){
    222222
    223223        // print_r($args);
     
    277277    }
    278278
    279     add_action( 'pvtfw_plus_minus_qty_input', 'pvt_plus_minus_qty_input_markup', 10, 1 );
     279    add_action( 'pvtfw_plus_minus_qty_input', 'pvtfw_plus_minus_qty_input_markup', 10, 1 );
    280280
    281281}
     
    289289 */
    290290
    291 if( !function_exists( 'pvt_basic_qty_input_markup' ) ){
    292 
    293     function pvt_basic_qty_input_markup( $args ){
     291if( !function_exists( 'pvtfw_basic_qty_input_markup' ) ){
     292
     293    function pvtfw_basic_qty_input_markup( $args ){
    294294
    295295        /* translators: %s is replaced with the product name or quantity text */
     
    344344    }
    345345
    346     add_action( 'pvtfw_basic_qty_input', 'pvt_basic_qty_input_markup', 10, 1 );
     346    add_action( 'pvtfw_basic_qty_input', 'pvtfw_basic_qty_input_markup', 10, 1 );
    347347
    348348}
     
    355355 */
    356356
    357 if( !function_exists( 'pvt_push_in_stock_text' ) ){
    358 
    359     function pvt_push_in_stock_text( $availability, $product ){
     357if( !function_exists( 'pvtfw_push_in_stock_text' ) ){
     358
     359    function pvtfw_push_in_stock_text( $availability, $product ){
    360360
    361361        if ( $product->is_in_stock() && $product->get_stock_quantity() === null && !$product->is_on_backorder( 1 ) ) {
     
    369369    }
    370370
    371     add_filter( 'woocommerce_get_availability_text', 'pvt_push_in_stock_text', 99, 2 );
     371    add_filter( 'woocommerce_get_availability_text', 'pvtfw_push_in_stock_text', 99, 2 );
    372372
    373373}
     
    381381 */
    382382
    383 if( !function_exists( 'pvt_display_cart_button' ) ){
    384 
    385     function pvt_display_cart_button( $args ){
     383if( !function_exists( 'pvtfw_display_cart_button' ) ){
     384
     385    function pvtfw_display_cart_button( $args ){
    386386
    387387        $stock_info = esc_html__('Out of Stock', 'product-variant-table-for-woocommerce');
    388388
    389         $cart_button = pvt_cart_button_condition( $args, $stock_info ); //callback function
     389        $cart_button = pvtfw_cart_button_condition( $args, $stock_info ); //callback function
    390390
    391391        if( $args['stock_status'] === 'instock' || $args['stock_status'] === 'onbackorder' ){
     
    396396                $args['product_url'],
    397397                $args['variant_id'],
     398                $args['product_name'],
    398399                $args['text']
    399400            );
     
    406407                $args['product_url'],
    407408                $args['variant_id'],
     409                $args['product_name'],
    408410                $stock_info
    409411            );
     
    413415    }
    414416
    415     add_filter( 'pvt_print_cart_btn', 'pvt_display_cart_button', 99, 1 );
    416 
    417 }
    418 
    419 /**
    420  * =============================================================================
    421  * Callback function for `pvt_display_cart_button`
     417    add_filter( 'pvtfw_print_cart_btn', 'pvtfw_display_cart_button', 99, 1 );
     418
     419}
     420
     421/**
     422 * =============================================================================
     423 * Callback function for `pvtfw_display_cart_button`
    422424 * @since 1.5.5
    423425 * @updated 1.6.4.1
     
    425427 * =============================================================================
    426428 */
    427 if( !function_exists( 'pvt_cart_button_condition' ) ){
    428 
    429     function pvt_cart_button_condition( $args, $stock_info ){
     429if( !function_exists( 'pvtfw_cart_button_condition' ) ){
     430
     431    function pvtfw_cart_button_condition( $args, $stock_info ){
    430432
    431433        if( $args['stock_status'] === 'instock' || $args['stock_status'] === 'onbackorder' ){
    432434            echo wp_kses_post(
    433                 sprintf('<button data-product-id="%s" data-url="%s" data-product="%s" data-variant="%s" class="%s">
     435                sprintf('<button data-product-id="%s" data-url="%s" data-product="%s" data-variant="%s" data-product-name="%s" class="%s">
    434436                    <span class="pvtfw-btn-text">%s</span>
    435437                    <div class="spinner-wrap"><span class="pvt-icon-spinner"></span></div>
     
    439441                    $args['product_url'],
    440442                    $args['variant_id'],
     443                    $args['product_name'],
    441444                    /**
    442445                     *
  • product-variant-table-for-woocommerce/trunk/inc/frontend/class_pvtfw_available_btn.php

    r3238050 r3419419  
    2828        {
    2929            // Default is `false` to apply table markup and feature
    30             if( apply_filters( 'disable_pvt_to_apply', false ) || apply_filters( 'disable_pvt_to_show_available_option', false ) ){
     30            if( apply_filters( 'pvtfw_disable_to_apply', false ) || apply_filters( 'pvtfw_disable_to_show_available_option', false ) ){
    3131                return;
    3232            }
     
    3737            }
    3838
    39             // Get Available variations?
     39            /**
     40             * Get Available variations?
     41             * (Ignore this hook. It is a standard WooCommerce hook.)
     42             * phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound
     43             */
    4044            $get_variations = count( $product->get_children() ) <= apply_filters( 'woocommerce_ajax_variation_threshold', 30, $product );
    4145
    4246            $available_variations = $get_variations ? $product->get_available_variations() : false;
    4347
    44             // Don't do anything if variable product has an issue with setup like- price is missing
    45             // Just display a message as WooCommerce does.
     48            /**
     49             * Don't do anything if variable product has an issue with setup like- price is missing
     50             * Just display a message as WooCommerce does.
     51             */
    4652            if ( empty( $available_variations ) && false !== $available_variations ){ ?>
    47                 <p class="stock out-of-stock"><?php echo esc_html( apply_filters( 'woocommerce_out_of_stock_message', __( 'This product is currently out of stock and unavailable.', 'product-variant-table-for-woocommerce' ) ) ); ?></p>
     53                <p class="stock out-of-stock">
     54                    <?php
     55                    /**
     56                     * (Ignore this hook. It is a standard WooCommerce hook.)
     57                     * phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound
     58                     */
     59                    echo esc_html( apply_filters( 'woocommerce_out_of_stock_message', __( 'This product is currently out of stock and unavailable.', 'product-variant-table-for-woocommerce' ) ) );
     60                    ?>
     61                </p>
    4862                <?php
    4963                return;
  • product-variant-table-for-woocommerce/trunk/inc/frontend/class_pvtfw_cart.php

    r3367978 r3419419  
    185185            if ($passed_validation && WC()->cart->add_to_cart($product_id, $quantity, $variation_id) && 'publish' === $product_status) {
    186186       
     187                /**
     188                 * (Ignore this hook. It is a standard WooCommerce hook.)
     189                 * phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound
     190                 */
    187191                do_action('woocommerce_ajax_added_to_cart', $product_id);
    188192       
     
    230234       
    231235       
     236            /**
     237             * (Ignore this hook. It is a standard WooCommerce hook.)
     238             * phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound
     239             */
    232240            $notice_types = apply_filters( 'woocommerce_notice_types', array( 'error', 'success', 'notice' ) );
    233241
  • product-variant-table-for-woocommerce/trunk/inc/frontend/class_pvtfw_print_table.php

    r3318369 r3419419  
    2929
    3030            // Default is `false` to apply table markup and feature
    31             if( apply_filters( 'disable_pvt_to_apply', false ) || apply_filters( 'disable_pvt_table_markup_to_apply', false ) ){
     31            if( apply_filters( 'pvtfw_disable_to_apply', false ) || apply_filters( 'pvtfw_disable_table_markup_to_apply', false ) ){
    3232                return;
    3333            }
     
    4949            if( is_a( $product, 'WC_Product_Variable' ) ) { 
    5050
    51                 // Get Available variations?
     51                /**
     52                 * Get Available variations?
     53                 *
     54                 * (Ignore this hook. It is a standard WooCommerce hook.)
     55                 * phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound
     56                 */
    5257                $get_variations = count( $product->get_children() ) <= apply_filters( 'woocommerce_ajax_variation_threshold', 30, $product );
    5358
     
    172177
    173178            // Default is `false` to apply table markup and feature
    174             if( apply_filters( 'disable_pvt_shortcode_to_apply', false ) ){
     179            if( apply_filters( 'pvtfw_disable_shortcode_to_apply', false ) ){
    175180                return;
    176181            }
     
    184189                if ( is_a( $get_product, 'WC_Product_Variable' ) ) {
    185190
    186                     // Get Available variations?
     191                    /**
     192                     * Get Available variations?
     193                     *
     194                     * (Ignore this hook. It is a standard WooCommerce hook.)
     195                     * phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound
     196                     */
    187197                    $get_variations = count( $get_product->get_children() ) <= apply_filters( 'woocommerce_ajax_variation_threshold', 30, $get_product );
    188198
  • product-variant-table-for-woocommerce/trunk/inc/table-parts/content-tbody.php

    r3367978 r3419419  
    4646
    4747                // Not collect some variation data
    48                 if( apply_filters( 'pvt_skip_some_variation', false, $single_variation ) ){
     48                if( apply_filters( 'pvtfw_skip_some_variation', false, $single_variation ) ){
    4949                    continue;
    5050                }
     
    6464                    $options['weight_html'][] = apply_filters('pvtfw_table_weight_html', wc_format_weight($single_variation->get_weight(false)), $single_variation);
    6565                    $options['availability_html'][] = apply_filters('pvtfw_table_availability_html', wc_get_stock_html( $single_variation ), $single_variation);
    66 ;
    6766
    6867                    // Applying filter for price
     
    8180                        'input_name'   => 'quantity',
    8281                        'input_value'  => '1',
     82                        /**
     83                         * (Ignore these hooks. It is a standard WooCommerce hooks.)
     84                         * phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound
     85                         */
    8386                        'classes'      => apply_filters( 'woocommerce_quantity_input_classes', array( 'input-text', 'qty', 'text' ), $single_variation ),
    8487                        'max_value'    => apply_filters( 'woocommerce_quantity_input_max', -1, $single_variation ),
     
    107110                    /**
    108111                     *
    109                      * @note: woocommerce_quantity_input_args changed to pvt_woocommerce_quantity_input_args
     112                     * @note: woocommerce_quantity_input_args changed to pvtfw_woocommerce_quantity_input_args
    110113                     *
    111114                     * $options['quantity'] called outside of the condition and replaced with $options_qty_layout
     
    113116                     * @since version 1.4.13
    114117                     *
     118                     * @updated in version 1.9.0
     119                     *
    115120                     **/
    116                     $options['quantity'][] = apply_filters( 'pvt_woocommerce_quantity_input_args', $options_qty_layout, $qty_layout, $single_variation );
     121                    $options['quantity'][] = apply_filters( 'pvtfw_woocommerce_quantity_input_args', $options_qty_layout, $qty_layout, $single_variation );
    117122                    /**
    118123                     *
     
    121126                     *
    122127                     * @since version 1.6.0
     128                     *
     129                     * @updated in 1.9.0
    123130                     *
    124131                     **/
     
    128135                        'product_url'       => $product_url,
    129136                        'variant_id'        => $variant_id,
     137                        'product_name'      => $single_variation ? $single_variation->get_name() : '',
    130138                        'stock_status'      => $single_variation->get_stock_status(),
    131139                        'text'              => $text,
     
    314322                            // If term is not empty then print attribute label else product page inputted vairation name
    315323                            if(!empty($term)){
    316                                 echo wp_kses_post( apply_filters( "pvt_global_attribute_terms", "<td data-title='{$taxonomy_name}'>{$term->name}</td>", $term, $taxonomy_name ) );
     324                                echo wp_kses_post( apply_filters( "pvtfw_global_attribute_terms", "<td data-title='{$taxonomy_name}'>{$term->name}</td>", $term, $taxonomy_name ) );
    317325                                // Structure of id is {column title}-{product id}-{generated id}-{another generated id}
    318326                            }
    319327                            else{
    320                                 echo wp_kses_post( apply_filters( "pvt_custom_attribute_terms", "<td data-title='{$taxonomy_name}'>{$val}</td>", $val, $taxonomy_name ) );
     328                                echo wp_kses_post( apply_filters( "pvtfw_custom_attribute_terms", "<td data-title='{$taxonomy_name}'>{$val}</td>", $val, $taxonomy_name ) );
    321329                                // Structure of id is {column title}-{product id}-{generated id}-{another generated id}
    322330                            }
     
    339347                                 * Function name: `pvt_display_qty_field`
    340348                                 *
    341                                  * New Hook name: `pvt_print_qty_field`
     349                                 * 1.6.0 - Hook name: `pvt_print_qty_field`
     350                                 *
     351                                 * New Hook name: `pvtfw_print_qty_field`
    342352                                 * 
    343353                                 * @since 1.4.14
     
    347357                                 * @modified in 1.6.0
    348358                                 *
     359                                 * @modified in 1.9.0
     360                                 *
    349361                                 */
    350362
    351363                                // print_r($value);
    352364
    353                                 apply_filters( 'pvt_print_qty_field', $value );
     365                                apply_filters( 'pvtfw_print_qty_field', $value );
    354366
    355367                                // woocommerce_quantity_input($value);
     
    376388                                 * Hooked Function: `pvt_display_cart_button`
    377389                                 *
    378                                  * Hook name: `pvt_print_cart_btn`
     390                                 * 1.6.0 - Hook name: `pvt_print_cart_btn`
     391                                 *
     392                                 * Hook name: `pvtfw_print_cart_btn`
    379393                                 * 
    380394                                 * @since 1.6.0
    381395                                 *
    382                                  *
     396                                 * @modified 1.9.0
    383397                                 */
    384398
    385                                 apply_filters( 'pvt_print_cart_btn', $value );
     399                                apply_filters( 'pvtfw_print_cart_btn', $value );
    386400
    387401                                // woocommerce_quantity_input($value);
  • product-variant-table-for-woocommerce/trunk/inc/table-parts/content-thead.php

    r3098894 r3419419  
    4444 * ====================================================
    4545 */
    46 if( !function_exists( 'get_attr_label' ) ){
     46if( !function_exists( 'pvtfw_get_attr_label' ) ){
    4747
    48     function get_attr_label( $atts ){
     48    function pvtfw_get_attr_label( $atts ){
    4949
    5050        $product = wc_get_product( absint( $atts["id"] ) );
     
    7575
    7676        $latest = pvtfw_process_table_header();
    77         $attr_lbl = get_attr_label( $atts );
     77        $attr_lbl = pvtfw_get_attr_label( $atts );
    7878
    7979        /**
  • product-variant-table-for-woocommerce/trunk/inc/wpxtension/wpx-sidebar.php

    r3098894 r3419419  
    3838        public static function block($icon, $title, $details){
    3939
    40             do_action('wpx_sidebar_before_block');
    41 
    4240            ?>
    4341
     
    6058            <?php
    6159
    62             do_action('wpx_sidebar_after_block');
    63 
    6460        }
    6561
  • product-variant-table-for-woocommerce/trunk/languages/product-variant-table-for-woocommerce.pot

    r3367978 r3419419  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: PVT - Product Variation Table for WooCommerce 1.8.0\n"
     5"Project-Id-Version: PVT - Product Variation Table for WooCommerce 1.9.0\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/product-variant-table-for-woocommerce\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
     
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2025-09-25T09:46:45+00:00\n"
     12"POT-Creation-Date: 2025-12-14T06:38:08+00:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1414"X-Generator: WP-CLI 2.11.0\n"
     
    178178
    179179#: inc/admin/class_pvtfw_form.php:272
    180 #: inc/frontend/class_pvtfw_available_btn.php:69
     180#: inc/frontend/class_pvtfw_available_btn.php:83
    181181msgid "Available options"
    182182msgstr ""
     
    205205
    206206#: inc/admin/class_pvtfw_settings.php:81
    207 #: product-variant-table-for-woocommerce.php:410
     207#: product-variant-table-for-woocommerce.php:417
    208208msgid "Settings"
    209209msgstr ""
     
    226226
    227227#: inc/class_pvtfw_common.php:36
    228 #: inc/table-parts/content-tbody.php:166
     228#: inc/table-parts/content-tbody.php:174
    229229msgid "Thumbnail"
    230230msgstr ""
    231231
    232232#: inc/class_pvtfw_common.php:37
    233 #: inc/table-parts/content-tbody.php:174
     233#: inc/table-parts/content-tbody.php:182
    234234msgid "SKU"
    235235msgstr ""
    236236
    237237#: inc/class_pvtfw_common.php:38
    238 #: inc/table-parts/content-tbody.php:190
     238#: inc/table-parts/content-tbody.php:198
    239239msgid "Description"
    240240msgstr ""
    241241
    242242#: inc/class_pvtfw_common.php:39
    243 #: inc/table-parts/content-tbody.php:198
    244 #: inc/table-parts/content-tbody.php:298
     243#: inc/table-parts/content-tbody.php:206
     244#: inc/table-parts/content-tbody.php:306
    245245#: inc/table-parts/content-thead.php:93
    246246msgid "Attributes"
     
    248248
    249249#: inc/class_pvtfw_common.php:40
    250 #: inc/table-parts/content-tbody.php:206
     250#: inc/table-parts/content-tbody.php:214
    251251msgid "Dimensions"
    252252msgstr ""
    253253
    254254#: inc/class_pvtfw_common.php:41
    255 #: inc/table-parts/content-tbody.php:214
     255#: inc/table-parts/content-tbody.php:222
    256256msgid "Weight"
    257257msgstr ""
    258258
    259259#: inc/class_pvtfw_common.php:42
    260 #: inc/table-parts/content-tbody.php:222
     260#: inc/table-parts/content-tbody.php:230
    261261msgid "Stock"
    262262msgstr ""
    263263
    264264#: inc/class_pvtfw_common.php:43
    265 #: inc/table-parts/content-tbody.php:182
     265#: inc/table-parts/content-tbody.php:190
    266266msgid "Price"
    267267msgstr ""
     
    269269#. translators: %s is replaced with the product name or quantity text
    270270#: inc/class_pvtfw_common.php:44
    271 #: inc/compatibility.php:222
    272 #: inc/compatibility.php:292
    273 #: inc/table-parts/content-tbody.php:230
    274 #: inc/table-parts/content-tbody.php:326
     271#: inc/compatibility.php:226
     272#: inc/compatibility.php:296
     273#: inc/table-parts/content-tbody.php:238
     274#: inc/table-parts/content-tbody.php:334
    275275msgid "Quantity"
    276276msgstr ""
    277277
    278278#: inc/class_pvtfw_common.php:45
    279 #: inc/table-parts/content-tbody.php:238
    280 #: inc/table-parts/content-tbody.php:363
     279#: inc/table-parts/content-tbody.php:246
     280#: inc/table-parts/content-tbody.php:375
    281281#: inc/table-parts/content-thead.php:90
    282282msgid "Action"
    283283msgstr ""
    284284
    285 #: inc/class_pvtfw_common.php:114
     285#: inc/class_pvtfw_common.php:119
    286286msgid "New"
    287287msgstr ""
     
    296296
    297297#. translators: %s is replaced with the product name or quantity text
    298 #: inc/compatibility.php:222
    299 #: inc/compatibility.php:292
     298#: inc/compatibility.php:226
     299#: inc/compatibility.php:296
    300300msgid "%s quantity"
    301301msgstr ""
    302302
    303 #: inc/compatibility.php:257
    304 #: inc/compatibility.php:324
     303#: inc/compatibility.php:261
     304#: inc/compatibility.php:328
    305305msgid "Product quantity"
    306306msgstr ""
    307307
    308 #: inc/compatibility.php:359
     308#: inc/compatibility.php:363
    309309msgid "In Stock"
    310310msgstr ""
    311311
    312 #: inc/compatibility.php:383
     312#: inc/compatibility.php:387
    313313msgid "Out of Stock"
    314314msgstr ""
    315315
    316 #: inc/frontend/class_pvtfw_available_btn.php:47
     316#: inc/frontend/class_pvtfw_available_btn.php:59
    317317msgid "This product is currently out of stock and unavailable."
    318318msgstr ""
    319319
    320 #: inc/frontend/class_pvtfw_print_table.php:70
    321 #: inc/frontend/class_pvtfw_print_table.php:205
     320#: inc/frontend/class_pvtfw_print_table.php:75
     321#: inc/frontend/class_pvtfw_print_table.php:215
    322322msgid "Available Options"
    323323msgstr ""
     
    329329#: inc/table-parts/content-thead.php:111
    330330msgid "SubTotal"
    331 msgstr ""
    332 
    333 #: inc/wpxtension/wpx-setting-fields.php:60
    334 msgid "Unlock this feature >>>"
    335 msgstr ""
    336 
    337 #: inc/wpxtension/wpx-setting-fields.php:241
    338 msgid "Added License"
    339 msgstr ""
    340 
    341 #: inc/wpxtension/wpx-setting-fields.php:247
    342 msgid "License not added yet!"
    343331msgstr ""
    344332
     
    353341msgstr ""
    354342
    355 #: product-variant-table-for-woocommerce.php:416
     343#: product-variant-table-for-woocommerce.php:423
    356344msgid "Go Premium"
    357345msgstr ""
    358346
    359 #: product-variant-table-for-woocommerce.php:435
     347#: product-variant-table-for-woocommerce.php:442
    360348msgid "Help & Support"
    361349msgstr ""
    362350
    363 #: product-variant-table-for-woocommerce.php:436
     351#: product-variant-table-for-woocommerce.php:443
    364352msgid "Documentation"
    365353msgstr ""
    366354
    367355#. translators: %1$s: Main wrapper start, %2$s: Main wrapper end, %3$s: Bold wrapper start, %4$s: Bold wrapper end, %5$s: Pro Plugin Version
    368 #: product-variant-table-for-woocommerce.php:490
     356#: product-variant-table-for-woocommerce.php:509
    369357msgid "%1$sYou are running an older version of %3$s\"PVT - Product Variation Table for WooCommerce - Pro\"%4$s. Please upgrade to %3$s %5$s %4$s or higher.%2$s"
    370358msgstr ""
    371359
    372360#. translators: %s: Pro Plugin Version
    373 #: product-variant-table-for-woocommerce.php:506
     361#: product-variant-table-for-woocommerce.php:525
    374362msgid "You are running an older version of \"PVT - Product Variation Table for WooCommerce - Pro\". Please upgrade to %s or higher."
    375363msgstr ""
  • product-variant-table-for-woocommerce/trunk/product-variant-table-for-woocommerce.php

    r3367978 r3419419  
    88Text Domain: product-variant-table-for-woocommerce
    99Domain Path: /languages
    10 Version: 1.8.0
     10Version: 1.9.0
    1111Requires at least: 4.7.0
    1212Requires PHP: 5.6.20
    1313WC requires at least: 3.0.0
    14 WC tested up to: 10.2.1
     14WC tested up to: 10.4.2
    1515License: GPLv2 or later
    1616License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    3333 */
    3434
    35 define("PVTFW_VARIANT_TABLE_VERSION", '1.8.0');
    36 define("PVTFW_REQUIRED_PRO_VERSION", '1.8.0');
     35define("PVTFW_VARIANT_TABLE_VERSION", '1.9.0');
     36define("PVTFW_REQUIRED_PRO_VERSION", '1.9.0');
    3737define("PVTFW_DIR", plugin_dir_path(__FILE__) );
    3838define("PVTFW_FILE", plugin_basename(__FILE__));
     
    164164            // Body Class
    165165            add_action( 'body_class', array( $this, 'pvt_body_class' ) );
     166
     167            // Translation function
     168            add_action( 'init', array( $this,'dynamic_text_register_to_translate' ) );
    166169        }
    167170
     
    192195             */
    193196            if (
     197                // (Ignore this hook. It is a standard WordPress hook.)
     198                // phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound
    194199                in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) )
    195200            ){
     
    223228             */
    224229            if (
     230                // (Ignore this hook. It is a standard WordPress hook.)
     231                // phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound
    225232                in_array( 'product-variant-table-for-woocommerce-pro/product-variant-table-for-woocommerce-pro.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) )
    226233            ){
     
    299306        public function remove_add_to_cart() {
    300307            // Default is `false` to apply table markup and feature
    301             if( apply_filters( 'disable_pvt_to_apply', false ) || apply_filters( 'disable_pvt_to_remove_add_to_cart', false ) ){
     308            if( apply_filters( 'pvtfw_disable_to_apply', false ) || apply_filters( 'pvtfw_disable_to_remove_add_to_cart', false ) ){
    302309                return;
    303310            }
     
    444451        }
    445452
     453
     454        /**
     455         * ================================================================
     456         * Registering the options for translation.
     457         * ================================================================
     458         * @since 1.9.0
     459         */
     460        public function dynamic_text_register_to_translate(){
     461            PVTFW_COMMON::register_translatable_option( 'pvtfw_variant_table_available_options_btn_text', 'Available options' );
     462            PVTFW_COMMON::register_translatable_option( 'pvtfw_variant_table_cart_btn_text', 'Add to Cart' );
     463        }
     464
    446465    }
    447466
  • product-variant-table-for-woocommerce/trunk/readme.txt

    r3367978 r3419419  
    11=== PVT - Product Variation Table for WooCommerce ===
    22Contributors: wpxteam, hakik, rudolfl
     3Donate link: https://wpxtension.com
    34Tags: woocommerce, variations, table, variations table, woocommerce variable
    45Requires at least: 4.7.0
    5 Tested up to: 6.8
     6Tested up to: 6.9
    67Requires PHP: 5.6.20
    7 Stable tag: 1.8.0
     8Stable tag: 1.9.0
    89License: GPLv2 or later
    910License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    160161?>`
    161162
    162 = After updating PVT(1.4.14 or greater than 1.4.14) the quantity field (+/- button) style seems different, Can I use the theme provided design? =
     163= After updating PVT(1.9.0 or greater than 1.9.0) the quantity field (+/- button) style seems different, Can I use the theme provided design? =
    163164
    164165You can add the following code inside your child theme's functions.php file. We recommend using a child theme rather than the main/parent theme.
    165166
    166 `remove_filter( 'pvt_print_qty_field', 'pvt_display_qty_field', 10, 1 );
    167 add_filter( 'pvt_print_qty_field', function( $value ){ return woocommerce_quantity_input($value); });`
     167`remove_filter( 'pvtfw_print_qty_field', 'pvt_display_qty_field', 10, 1 );
     168add_filter( 'pvtfw_print_qty_field', function( $value ){ return woocommerce_quantity_input($value); });`
    168169
    169170**Suggestion:** You can also add the snippet using a plugin called [Code Snippets](https://wordpress.org/plugins/code-snippets/)
     
    181182== Changelog ==
    182183
    183 = 1.8.0 [25-09-2025] Thursday =
    184 * Update: Script.
    185 * Update: Settings fields.
    186 * Add: Hook `pvtfw_oos_msg_instead_qty_field`.
    187 * Compatibility: WooCommerce 10.2.1.
     184= 1.9.0 [14-12-2025] Sunday =
     185* Added: WPML & Polylang Support.
     186* Updated: $options array to add product name to the add-to-cart button.
     187* Updated: Stylesheet to apply plugin settings for table footer.
     188* Update: All hooks follow the Plugin Check Plugin (PCP) WPCS coding standards. If you’ve added custom code using PVT php hooks/functions, please replace the `pvt_` prefixes with `pvtfw_`.
     189* Dev: Hooks Information-
     190    - **Previous:** `disable_pvt_to_apply` **Current:** `pvtfw_disable_to_apply`.
     191    - **Previous:** `disable_pvt_table_markup_to_apply` **Current:** `pvtfw_disable_table_markup_to_apply`.
     192    - **Previous:** `disable_pvt_shortcode_to_apply` **Current:** `pvtfw_disable_shortcode_to_apply`.
     193    - **Previous:** `disable_pvt_to_show_available_option` **Current:** `pvtfw_disable_to_show_available_option`.
     194    - **Previous:** `all_pvt_options` **Current:** `pvtfw_all_options`.
     195    - **Previous:** `pvt_allowed_tags` **Current:** `pvtfw_allowed_tags`.
     196    - **Previous:** `pvt_skip_some_variation` **Current:** `pvtfw_skip_some_variation`.
     197    - **Previous:** `pvt_woocommerce_quantity_input_args` **Current:** `pvtfw_woocommerce_quantity_input_args`.
     198    - **Previous:** `pvt_global_attribute_terms` **Current:** `pvtfw_global_attribute_terms`.
     199    - **Previous:** `pvt_custom_attribute_terms` **Current:** `pvtfw_custom_attribute_terms`.
     200    - **Previous:** `pvt_print_qty_field` **Current:** `pvtfw_print_qty_field`.
     201    - **Previous:** `pvt_print_cart_btn` **Current:** `pvtfw_print_cart_btn`.
     202    - **Previous:** `pvt_after_quantity_field_markup` **Current:** `pvtfw_after_quantity_field_markup`.
     203    - **Previous:** `disable_pvt_to_remove_add_to_cart` **Current:** `pvtfw_disable_to_remove_add_to_cart`.
     204    - **Note** The JavaScript events/triggers remain in their current state.
     205* Compatibility: WordPress 6.9 & WooCommerce 10.4.2.
    188206
    189207
     
    193211== Upgrade Notice ==
    194212
    195 = 1.8.0 [24-09-2025] Wednesday =
    196 * Update: Script.
    197 * Update: Settings fields.
    198 * Add: Hook `pvtfw_oos_msg_instead_qty_field`.
    199 * Compatibility: WooCommerce 10.2.1.
     213= 1.9.0 [14-12-2025] Sunday =
     214* Added: WPML & Polylang Support.
     215* Update: All hooks follow the Plugin Check Plugin (PCP) WPCS coding standards. If you’ve added custom code using PVT php hooks/functions, please replace the `pvt_` prefixes with `pvtfw_`.
     216* Dev: For hook references, check the changelog of 1.9.0.
  • product-variant-table-for-woocommerce/trunk/uninstall.php

    r2995806 r3419419  
    66}
    77
    8 $options_array = array(
     8$pvtfw_options_array = array(
    99    'pvtfw_variant_table_place',
    1010    'pvtfw_variant_table_columns',
     
    2323);
    2424
    25 foreach ($options_array as $key => $option) {
    26     delete_option($option);
     25foreach ($pvtfw_options_array as $pvtfw_key => $pvtfw_option) {
     26    delete_option($pvtfw_option);
    2727}
    2828 
Note: See TracChangeset for help on using the changeset viewer.