Changeset 3419419
- Timestamp:
- 12/14/2025 03:39:08 PM (3 months ago)
- Location:
- product-variant-table-for-woocommerce
- Files:
-
- 51 added
- 1 deleted
- 12 edited
-
tags/1.9.0 (added)
-
tags/1.9.0/admin (added)
-
tags/1.9.0/admin/css (added)
-
tags/1.9.0/admin/css/pvtfw_backend.css (added)
-
tags/1.9.0/admin/js (added)
-
tags/1.9.0/admin/js/pvtfw_backend.js (added)
-
tags/1.9.0/inc (added)
-
tags/1.9.0/inc/admin (added)
-
tags/1.9.0/inc/admin/class_pvtfw_advance.php (added)
-
tags/1.9.0/inc/admin/class_pvtfw_bulk_cart.php (added)
-
tags/1.9.0/inc/admin/class_pvtfw_form.php (added)
-
tags/1.9.0/inc/admin/class_pvtfw_settings.php (added)
-
tags/1.9.0/inc/admin/class_pvtfw_styling.php (added)
-
tags/1.9.0/inc/class_pvtfw_common.php (added)
-
tags/1.9.0/inc/compatibility.php (added)
-
tags/1.9.0/inc/frontend (added)
-
tags/1.9.0/inc/frontend/class_pvtfw_allocation.php (added)
-
tags/1.9.0/inc/frontend/class_pvtfw_available_btn.php (added)
-
tags/1.9.0/inc/frontend/class_pvtfw_cart.php (added)
-
tags/1.9.0/inc/frontend/class_pvtfw_print_table.php (added)
-
tags/1.9.0/inc/style.php (added)
-
tags/1.9.0/inc/table-parts (added)
-
tags/1.9.0/inc/table-parts/content-tbody.php (added)
-
tags/1.9.0/inc/table-parts/content-thead.php (added)
-
tags/1.9.0/inc/wpxtension (added)
-
tags/1.9.0/inc/wpxtension/wpx-menu.php (added)
-
tags/1.9.0/inc/wpxtension/wpx-sidebar.php (added)
-
tags/1.9.0/inc/wpxtension/wpxtension-admin-rtl.css (added)
-
tags/1.9.0/inc/wpxtension/wpxtension-admin.css (added)
-
tags/1.9.0/inc/wpxtension/wpxtension-admin.min-rtl.css (added)
-
tags/1.9.0/inc/wpxtension/wpxtension-admin.min.css (added)
-
tags/1.9.0/languages (added)
-
tags/1.9.0/languages/product-variant-table-for-woocommerce.pot (added)
-
tags/1.9.0/product-variant-table-for-woocommerce.php (added)
-
tags/1.9.0/public (added)
-
tags/1.9.0/public/css (added)
-
tags/1.9.0/public/css/pvtfw_frontend.css (added)
-
tags/1.9.0/public/css/pvtfw_table_breakdown.css (added)
-
tags/1.9.0/public/font (added)
-
tags/1.9.0/public/font/font (added)
-
tags/1.9.0/public/font/font/fontello.eot (added)
-
tags/1.9.0/public/font/font/fontello.svg (added)
-
tags/1.9.0/public/font/font/fontello.ttf (added)
-
tags/1.9.0/public/font/font/fontello.woff (added)
-
tags/1.9.0/public/font/font/fontello.woff2 (added)
-
tags/1.9.0/public/font/fontello.css (added)
-
tags/1.9.0/public/js (added)
-
tags/1.9.0/public/js/pvtfw_frontend.js (added)
-
tags/1.9.0/public/js/pvtfw_subtotal_calc.js (added)
-
tags/1.9.0/readme.txt (added)
-
tags/1.9.0/uninstall.php (added)
-
trunk/inc/class_pvtfw_common.php (modified) (5 diffs)
-
trunk/inc/compatibility.php (modified) (20 diffs)
-
trunk/inc/frontend/class_pvtfw_available_btn.php (modified) (2 diffs)
-
trunk/inc/frontend/class_pvtfw_cart.php (modified) (2 diffs)
-
trunk/inc/frontend/class_pvtfw_print_table.php (modified) (4 diffs)
-
trunk/inc/table-parts/content-tbody.php (modified) (11 diffs)
-
trunk/inc/table-parts/content-thead.php (modified) (2 diffs)
-
trunk/inc/wpxtension/wpx-setting-fields.php (deleted)
-
trunk/inc/wpxtension/wpx-sidebar.php (modified) (2 diffs)
-
trunk/languages/product-variant-table-for-woocommerce.pot (modified) (10 diffs)
-
trunk/product-variant-table-for-woocommerce.php (modified) (7 diffs)
-
trunk/readme.txt (modified) (4 diffs)
-
trunk/uninstall.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
product-variant-table-for-woocommerce/trunk/inc/class_pvtfw_common.php
r3245832 r3419419 56 56 * Get Setings as an object 57 57 * ==================================================== 58 * 59 * @updated in 1.9.0 60 * 61 * Changed the values of-> `available_title_text`, `cart_btn_text` 62 * 58 63 */ 59 64 public static function pvtfw_get_options(){ … … 64 69 'showTableHeader' => get_option('pvtfw_variant_table_show_table_header', 'on'), 65 70 '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' ), 67 72 'available_title_text' => get_option('pvtfw_variant_table_show_available_options_text', 'on'), 68 73 // 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' ), 70 75 'qty_layout' => get_option('pvtfw_variant_table_qty_layout', 'plus/minus'), 71 76 'showSubTotal' => get_option('pvtfw_variant_table_sub_total', ''), … … 78 83 ); 79 84 80 $pvt_option = apply_filters(' all_pvt_options', $options);85 $pvt_option = apply_filters('pvtfw_all_options', $options); 81 86 82 87 return (object)$pvt_option; … … 221 226 */ 222 227 public static function allowed_tags(){ 223 return apply_filters( 'pvt _allowed_tags', array(228 return apply_filters( 'pvtfw_allowed_tags', array( 224 229 'input' => array( 225 230 'class' => array(), … … 234 239 ) ); 235 240 } 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 } 236 261 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 238 296 239 297 } -
product-variant-table-for-woocommerce/trunk/inc/compatibility.php
r3367988 r3419419 8 8 */ 9 9 if ( 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(){ 12 12 return false; 13 13 } 14 add_filter( 'pvtfw_added_cart_filter', ' reycore_support' );14 add_filter( 'pvtfw_added_cart_filter', 'pvtfw_reycore_support' ); 15 15 endif; 16 16 endif; … … 55 55 56 56 57 if ( !function_exists( 'pvt _whols_plugin_support' ) && PVTFW_COMMON::check_plugin_state('whols') ){57 if ( !function_exists( 'pvtfw_whols_plugin_support' ) && PVTFW_COMMON::check_plugin_state('whols') ){ 58 58 59 59 60 60 61 function pvt _whols_plugin_support( $price_html, $single_variation ){61 function pvtfw_whols_plugin_support( $price_html, $single_variation ){ 62 62 63 63 $whols_plugin_options = (array) get_option( 'whols_options' ); … … 86 86 87 87 } 88 add_filter( 'pvtfw_price_html', 'pvt _whols_plugin_support', 20, 2 );88 add_filter( 'pvtfw_price_html', 'pvtfw_whols_plugin_support', 20, 2 ); 89 89 90 90 } … … 98 98 99 99 100 if ( !function_exists( 'pvt _get_price_html' ) ){101 102 function pvt _get_price_html( $price_html, $single_variation ){100 if ( !function_exists( 'pvtfw_get_price_html' ) ){ 101 102 function pvtfw_get_price_html( $price_html, $single_variation ){ 103 103 104 104 /** … … 112 112 113 113 } 114 add_filter( 'pvtfw_price_html', 'pvt _get_price_html', 10, 2 );114 add_filter( 'pvtfw_price_html', 'pvtfw_get_price_html', 10, 2 ); 115 115 116 116 } … … 130 130 */ 131 131 132 if( !function_exists( 'pvt _display_qty_field' ) ){133 134 function pvt _display_qty_field( $args ){132 if( !function_exists( 'pvtfw_display_qty_field' ) ){ 133 134 function pvtfw_display_qty_field( $args ){ 135 135 136 136 // A class to disable quantity field for unavailable variation quantity field … … 176 176 */ 177 177 178 do_action( 'pvt _after_quantity_field_markup', $args );178 do_action( 'pvtfw_after_quantity_field_markup', $args ); 179 179 180 180 } … … 198 198 */ 199 199 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 ); 207 207 208 208 } … … 217 217 */ 218 218 219 if( !function_exists( 'pvt _plus_minus_qty_input_markup' ) ){220 221 function pvt _plus_minus_qty_input_markup( $args ){219 if( !function_exists( 'pvtfw_plus_minus_qty_input_markup' ) ){ 220 221 function pvtfw_plus_minus_qty_input_markup( $args ){ 222 222 223 223 // print_r($args); … … 277 277 } 278 278 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 ); 280 280 281 281 } … … 289 289 */ 290 290 291 if( !function_exists( 'pvt _basic_qty_input_markup' ) ){292 293 function pvt _basic_qty_input_markup( $args ){291 if( !function_exists( 'pvtfw_basic_qty_input_markup' ) ){ 292 293 function pvtfw_basic_qty_input_markup( $args ){ 294 294 295 295 /* translators: %s is replaced with the product name or quantity text */ … … 344 344 } 345 345 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 ); 347 347 348 348 } … … 355 355 */ 356 356 357 if( !function_exists( 'pvt _push_in_stock_text' ) ){358 359 function pvt _push_in_stock_text( $availability, $product ){357 if( !function_exists( 'pvtfw_push_in_stock_text' ) ){ 358 359 function pvtfw_push_in_stock_text( $availability, $product ){ 360 360 361 361 if ( $product->is_in_stock() && $product->get_stock_quantity() === null && !$product->is_on_backorder( 1 ) ) { … … 369 369 } 370 370 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 ); 372 372 373 373 } … … 381 381 */ 382 382 383 if( !function_exists( 'pvt _display_cart_button' ) ){384 385 function pvt _display_cart_button( $args ){383 if( !function_exists( 'pvtfw_display_cart_button' ) ){ 384 385 function pvtfw_display_cart_button( $args ){ 386 386 387 387 $stock_info = esc_html__('Out of Stock', 'product-variant-table-for-woocommerce'); 388 388 389 $cart_button = pvt _cart_button_condition( $args, $stock_info ); //callback function389 $cart_button = pvtfw_cart_button_condition( $args, $stock_info ); //callback function 390 390 391 391 if( $args['stock_status'] === 'instock' || $args['stock_status'] === 'onbackorder' ){ … … 396 396 $args['product_url'], 397 397 $args['variant_id'], 398 $args['product_name'], 398 399 $args['text'] 399 400 ); … … 406 407 $args['product_url'], 407 408 $args['variant_id'], 409 $args['product_name'], 408 410 $stock_info 409 411 ); … … 413 415 } 414 416 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` 422 424 * @since 1.5.5 423 425 * @updated 1.6.4.1 … … 425 427 * ============================================================================= 426 428 */ 427 if( !function_exists( 'pvt _cart_button_condition' ) ){428 429 function pvt _cart_button_condition( $args, $stock_info ){429 if( !function_exists( 'pvtfw_cart_button_condition' ) ){ 430 431 function pvtfw_cart_button_condition( $args, $stock_info ){ 430 432 431 433 if( $args['stock_status'] === 'instock' || $args['stock_status'] === 'onbackorder' ){ 432 434 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"> 434 436 <span class="pvtfw-btn-text">%s</span> 435 437 <div class="spinner-wrap"><span class="pvt-icon-spinner"></span></div> … … 439 441 $args['product_url'], 440 442 $args['variant_id'], 443 $args['product_name'], 441 444 /** 442 445 * -
product-variant-table-for-woocommerce/trunk/inc/frontend/class_pvtfw_available_btn.php
r3238050 r3419419 28 28 { 29 29 // 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 ) ){ 31 31 return; 32 32 } … … 37 37 } 38 38 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 */ 40 44 $get_variations = count( $product->get_children() ) <= apply_filters( 'woocommerce_ajax_variation_threshold', 30, $product ); 41 45 42 46 $available_variations = $get_variations ? $product->get_available_variations() : false; 43 47 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 */ 46 52 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> 48 62 <?php 49 63 return; -
product-variant-table-for-woocommerce/trunk/inc/frontend/class_pvtfw_cart.php
r3367978 r3419419 185 185 if ($passed_validation && WC()->cart->add_to_cart($product_id, $quantity, $variation_id) && 'publish' === $product_status) { 186 186 187 /** 188 * (Ignore this hook. It is a standard WooCommerce hook.) 189 * phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound 190 */ 187 191 do_action('woocommerce_ajax_added_to_cart', $product_id); 188 192 … … 230 234 231 235 236 /** 237 * (Ignore this hook. It is a standard WooCommerce hook.) 238 * phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound 239 */ 232 240 $notice_types = apply_filters( 'woocommerce_notice_types', array( 'error', 'success', 'notice' ) ); 233 241 -
product-variant-table-for-woocommerce/trunk/inc/frontend/class_pvtfw_print_table.php
r3318369 r3419419 29 29 30 30 // 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 ) ){ 32 32 return; 33 33 } … … 49 49 if( is_a( $product, 'WC_Product_Variable' ) ) { 50 50 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 */ 52 57 $get_variations = count( $product->get_children() ) <= apply_filters( 'woocommerce_ajax_variation_threshold', 30, $product ); 53 58 … … 172 177 173 178 // 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 ) ){ 175 180 return; 176 181 } … … 184 189 if ( is_a( $get_product, 'WC_Product_Variable' ) ) { 185 190 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 */ 187 197 $get_variations = count( $get_product->get_children() ) <= apply_filters( 'woocommerce_ajax_variation_threshold', 30, $get_product ); 188 198 -
product-variant-table-for-woocommerce/trunk/inc/table-parts/content-tbody.php
r3367978 r3419419 46 46 47 47 // 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 ) ){ 49 49 continue; 50 50 } … … 64 64 $options['weight_html'][] = apply_filters('pvtfw_table_weight_html', wc_format_weight($single_variation->get_weight(false)), $single_variation); 65 65 $options['availability_html'][] = apply_filters('pvtfw_table_availability_html', wc_get_stock_html( $single_variation ), $single_variation); 66 ;67 66 68 67 // Applying filter for price … … 81 80 'input_name' => 'quantity', 82 81 'input_value' => '1', 82 /** 83 * (Ignore these hooks. It is a standard WooCommerce hooks.) 84 * phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound 85 */ 83 86 'classes' => apply_filters( 'woocommerce_quantity_input_classes', array( 'input-text', 'qty', 'text' ), $single_variation ), 84 87 'max_value' => apply_filters( 'woocommerce_quantity_input_max', -1, $single_variation ), … … 107 110 /** 108 111 * 109 * @note: woocommerce_quantity_input_args changed to pvt _woocommerce_quantity_input_args112 * @note: woocommerce_quantity_input_args changed to pvtfw_woocommerce_quantity_input_args 110 113 * 111 114 * $options['quantity'] called outside of the condition and replaced with $options_qty_layout … … 113 116 * @since version 1.4.13 114 117 * 118 * @updated in version 1.9.0 119 * 115 120 **/ 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 ); 117 122 /** 118 123 * … … 121 126 * 122 127 * @since version 1.6.0 128 * 129 * @updated in 1.9.0 123 130 * 124 131 **/ … … 128 135 'product_url' => $product_url, 129 136 'variant_id' => $variant_id, 137 'product_name' => $single_variation ? $single_variation->get_name() : '', 130 138 'stock_status' => $single_variation->get_stock_status(), 131 139 'text' => $text, … … 314 322 // If term is not empty then print attribute label else product page inputted vairation name 315 323 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 ) ); 317 325 // Structure of id is {column title}-{product id}-{generated id}-{another generated id} 318 326 } 319 327 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 ) ); 321 329 // Structure of id is {column title}-{product id}-{generated id}-{another generated id} 322 330 } … … 339 347 * Function name: `pvt_display_qty_field` 340 348 * 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` 342 352 * 343 353 * @since 1.4.14 … … 347 357 * @modified in 1.6.0 348 358 * 359 * @modified in 1.9.0 360 * 349 361 */ 350 362 351 363 // print_r($value); 352 364 353 apply_filters( 'pvt _print_qty_field', $value );365 apply_filters( 'pvtfw_print_qty_field', $value ); 354 366 355 367 // woocommerce_quantity_input($value); … … 376 388 * Hooked Function: `pvt_display_cart_button` 377 389 * 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` 379 393 * 380 394 * @since 1.6.0 381 395 * 382 * 396 * @modified 1.9.0 383 397 */ 384 398 385 apply_filters( 'pvt _print_cart_btn', $value );399 apply_filters( 'pvtfw_print_cart_btn', $value ); 386 400 387 401 // woocommerce_quantity_input($value); -
product-variant-table-for-woocommerce/trunk/inc/table-parts/content-thead.php
r3098894 r3419419 44 44 * ==================================================== 45 45 */ 46 if( !function_exists( ' get_attr_label' ) ){46 if( !function_exists( 'pvtfw_get_attr_label' ) ){ 47 47 48 function get_attr_label( $atts ){48 function pvtfw_get_attr_label( $atts ){ 49 49 50 50 $product = wc_get_product( absint( $atts["id"] ) ); … … 75 75 76 76 $latest = pvtfw_process_table_header(); 77 $attr_lbl = get_attr_label( $atts );77 $attr_lbl = pvtfw_get_attr_label( $atts ); 78 78 79 79 /** -
product-variant-table-for-woocommerce/trunk/inc/wpxtension/wpx-sidebar.php
r3098894 r3419419 38 38 public static function block($icon, $title, $details){ 39 39 40 do_action('wpx_sidebar_before_block');41 42 40 ?> 43 41 … … 60 58 <?php 61 59 62 do_action('wpx_sidebar_after_block');63 64 60 } 65 61 -
product-variant-table-for-woocommerce/trunk/languages/product-variant-table-for-woocommerce.pot
r3367978 r3419419 3 3 msgid "" 4 4 msgstr "" 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" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/product-variant-table-for-woocommerce\n" 7 7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "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" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 14 "X-Generator: WP-CLI 2.11.0\n" … … 178 178 179 179 #: inc/admin/class_pvtfw_form.php:272 180 #: inc/frontend/class_pvtfw_available_btn.php: 69180 #: inc/frontend/class_pvtfw_available_btn.php:83 181 181 msgid "Available options" 182 182 msgstr "" … … 205 205 206 206 #: inc/admin/class_pvtfw_settings.php:81 207 #: product-variant-table-for-woocommerce.php:41 0207 #: product-variant-table-for-woocommerce.php:417 208 208 msgid "Settings" 209 209 msgstr "" … … 226 226 227 227 #: inc/class_pvtfw_common.php:36 228 #: inc/table-parts/content-tbody.php:1 66228 #: inc/table-parts/content-tbody.php:174 229 229 msgid "Thumbnail" 230 230 msgstr "" 231 231 232 232 #: inc/class_pvtfw_common.php:37 233 #: inc/table-parts/content-tbody.php:1 74233 #: inc/table-parts/content-tbody.php:182 234 234 msgid "SKU" 235 235 msgstr "" 236 236 237 237 #: inc/class_pvtfw_common.php:38 238 #: inc/table-parts/content-tbody.php:19 0238 #: inc/table-parts/content-tbody.php:198 239 239 msgid "Description" 240 240 msgstr "" 241 241 242 242 #: inc/class_pvtfw_common.php:39 243 #: inc/table-parts/content-tbody.php: 198244 #: inc/table-parts/content-tbody.php: 298243 #: inc/table-parts/content-tbody.php:206 244 #: inc/table-parts/content-tbody.php:306 245 245 #: inc/table-parts/content-thead.php:93 246 246 msgid "Attributes" … … 248 248 249 249 #: inc/class_pvtfw_common.php:40 250 #: inc/table-parts/content-tbody.php:2 06250 #: inc/table-parts/content-tbody.php:214 251 251 msgid "Dimensions" 252 252 msgstr "" 253 253 254 254 #: inc/class_pvtfw_common.php:41 255 #: inc/table-parts/content-tbody.php:2 14255 #: inc/table-parts/content-tbody.php:222 256 256 msgid "Weight" 257 257 msgstr "" 258 258 259 259 #: inc/class_pvtfw_common.php:42 260 #: inc/table-parts/content-tbody.php:2 22260 #: inc/table-parts/content-tbody.php:230 261 261 msgid "Stock" 262 262 msgstr "" 263 263 264 264 #: inc/class_pvtfw_common.php:43 265 #: inc/table-parts/content-tbody.php:1 82265 #: inc/table-parts/content-tbody.php:190 266 266 msgid "Price" 267 267 msgstr "" … … 269 269 #. translators: %s is replaced with the product name or quantity text 270 270 #: inc/class_pvtfw_common.php:44 271 #: inc/compatibility.php:22 2272 #: inc/compatibility.php:29 2273 #: inc/table-parts/content-tbody.php:23 0274 #: inc/table-parts/content-tbody.php:3 26271 #: 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 275 275 msgid "Quantity" 276 276 msgstr "" 277 277 278 278 #: inc/class_pvtfw_common.php:45 279 #: inc/table-parts/content-tbody.php:2 38280 #: inc/table-parts/content-tbody.php:3 63279 #: inc/table-parts/content-tbody.php:246 280 #: inc/table-parts/content-tbody.php:375 281 281 #: inc/table-parts/content-thead.php:90 282 282 msgid "Action" 283 283 msgstr "" 284 284 285 #: inc/class_pvtfw_common.php:11 4285 #: inc/class_pvtfw_common.php:119 286 286 msgid "New" 287 287 msgstr "" … … 296 296 297 297 #. translators: %s is replaced with the product name or quantity text 298 #: inc/compatibility.php:22 2299 #: inc/compatibility.php:29 2298 #: inc/compatibility.php:226 299 #: inc/compatibility.php:296 300 300 msgid "%s quantity" 301 301 msgstr "" 302 302 303 #: inc/compatibility.php:2 57304 #: inc/compatibility.php:32 4303 #: inc/compatibility.php:261 304 #: inc/compatibility.php:328 305 305 msgid "Product quantity" 306 306 msgstr "" 307 307 308 #: inc/compatibility.php:3 59308 #: inc/compatibility.php:363 309 309 msgid "In Stock" 310 310 msgstr "" 311 311 312 #: inc/compatibility.php:38 3312 #: inc/compatibility.php:387 313 313 msgid "Out of Stock" 314 314 msgstr "" 315 315 316 #: inc/frontend/class_pvtfw_available_btn.php: 47316 #: inc/frontend/class_pvtfw_available_btn.php:59 317 317 msgid "This product is currently out of stock and unavailable." 318 318 msgstr "" 319 319 320 #: inc/frontend/class_pvtfw_print_table.php:7 0321 #: inc/frontend/class_pvtfw_print_table.php:2 05320 #: inc/frontend/class_pvtfw_print_table.php:75 321 #: inc/frontend/class_pvtfw_print_table.php:215 322 322 msgid "Available Options" 323 323 msgstr "" … … 329 329 #: inc/table-parts/content-thead.php:111 330 330 msgid "SubTotal" 331 msgstr ""332 333 #: inc/wpxtension/wpx-setting-fields.php:60334 msgid "Unlock this feature >>>"335 msgstr ""336 337 #: inc/wpxtension/wpx-setting-fields.php:241338 msgid "Added License"339 msgstr ""340 341 #: inc/wpxtension/wpx-setting-fields.php:247342 msgid "License not added yet!"343 331 msgstr "" 344 332 … … 353 341 msgstr "" 354 342 355 #: product-variant-table-for-woocommerce.php:4 16343 #: product-variant-table-for-woocommerce.php:423 356 344 msgid "Go Premium" 357 345 msgstr "" 358 346 359 #: product-variant-table-for-woocommerce.php:4 35347 #: product-variant-table-for-woocommerce.php:442 360 348 msgid "Help & Support" 361 349 msgstr "" 362 350 363 #: product-variant-table-for-woocommerce.php:4 36351 #: product-variant-table-for-woocommerce.php:443 364 352 msgid "Documentation" 365 353 msgstr "" 366 354 367 355 #. 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: 490356 #: product-variant-table-for-woocommerce.php:509 369 357 msgid "%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" 370 358 msgstr "" 371 359 372 360 #. translators: %s: Pro Plugin Version 373 #: product-variant-table-for-woocommerce.php:5 06361 #: product-variant-table-for-woocommerce.php:525 374 362 msgid "You are running an older version of \"PVT - Product Variation Table for WooCommerce - Pro\". Please upgrade to %s or higher." 375 363 msgstr "" -
product-variant-table-for-woocommerce/trunk/product-variant-table-for-woocommerce.php
r3367978 r3419419 8 8 Text Domain: product-variant-table-for-woocommerce 9 9 Domain Path: /languages 10 Version: 1. 8.010 Version: 1.9.0 11 11 Requires at least: 4.7.0 12 12 Requires PHP: 5.6.20 13 13 WC requires at least: 3.0.0 14 WC tested up to: 10. 2.114 WC tested up to: 10.4.2 15 15 License: GPLv2 or later 16 16 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 33 33 */ 34 34 35 define("PVTFW_VARIANT_TABLE_VERSION", '1. 8.0');36 define("PVTFW_REQUIRED_PRO_VERSION", '1. 8.0');35 define("PVTFW_VARIANT_TABLE_VERSION", '1.9.0'); 36 define("PVTFW_REQUIRED_PRO_VERSION", '1.9.0'); 37 37 define("PVTFW_DIR", plugin_dir_path(__FILE__) ); 38 38 define("PVTFW_FILE", plugin_basename(__FILE__)); … … 164 164 // Body Class 165 165 add_action( 'body_class', array( $this, 'pvt_body_class' ) ); 166 167 // Translation function 168 add_action( 'init', array( $this,'dynamic_text_register_to_translate' ) ); 166 169 } 167 170 … … 192 195 */ 193 196 if ( 197 // (Ignore this hook. It is a standard WordPress hook.) 198 // phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound 194 199 in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) 195 200 ){ … … 223 228 */ 224 229 if ( 230 // (Ignore this hook. It is a standard WordPress hook.) 231 // phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound 225 232 in_array( 'product-variant-table-for-woocommerce-pro/product-variant-table-for-woocommerce-pro.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) 226 233 ){ … … 299 306 public function remove_add_to_cart() { 300 307 // 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 ) ){ 302 309 return; 303 310 } … … 444 451 } 445 452 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 446 465 } 447 466 -
product-variant-table-for-woocommerce/trunk/readme.txt
r3367978 r3419419 1 1 === PVT - Product Variation Table for WooCommerce === 2 2 Contributors: wpxteam, hakik, rudolfl 3 Donate link: https://wpxtension.com 3 4 Tags: woocommerce, variations, table, variations table, woocommerce variable 4 5 Requires at least: 4.7.0 5 Tested up to: 6. 86 Tested up to: 6.9 6 7 Requires PHP: 5.6.20 7 Stable tag: 1. 8.08 Stable tag: 1.9.0 8 9 License: GPLv2 or later 9 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 160 161 ?>` 161 162 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? = 163 164 164 165 You 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. 165 166 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 ); 168 add_filter( 'pvtfw_print_qty_field', function( $value ){ return woocommerce_quantity_input($value); });` 168 169 169 170 **Suggestion:** You can also add the snippet using a plugin called [Code Snippets](https://wordpress.org/plugins/code-snippets/) … … 181 182 == Changelog == 182 183 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. 188 206 189 207 … … 193 211 == Upgrade Notice == 194 212 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 6 6 } 7 7 8 $ options_array = array(8 $pvtfw_options_array = array( 9 9 'pvtfw_variant_table_place', 10 10 'pvtfw_variant_table_columns', … … 23 23 ); 24 24 25 foreach ($ options_array as $key => $option) {26 delete_option($ option);25 foreach ($pvtfw_options_array as $pvtfw_key => $pvtfw_option) { 26 delete_option($pvtfw_option); 27 27 } 28 28
Note: See TracChangeset
for help on using the changeset viewer.