Plugin Directory

Changeset 2041639


Ignore:
Timestamp:
02/28/2019 04:23:22 PM (6 years ago)
Author:
devikas301
Message:

tested with latest WP version

Location:
rockon-woo-variations-table/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • rockon-woo-variations-table/trunk/readme.txt

    r1830298 r2041639  
    33Tags:               woocommerce, variations, table, rockon, shortcode, vs
    44Requires at least:  3.6
    5 Tested up to:       4.9
     5Tested up to:       5.1
    66Stable tag:         1.0
    77License:            GPLv2 or later
  • rockon-woo-variations-table/trunk/ron-woo-variations-table.php

    r1833219 r2041639  
    2222define('RWVT_PLUGIN_NAME', plugin_basename(__FILE__));
    2323
    24 function ron_woo_variations_table( $atts ) {
    25    
     24function ron_woo_variations_table( $atts ) {   
    2625    $v = shortcode_atts( array(
    27                         'id'              => '',
    28                         'thead'           => '',
    29                         'disabled'        => '',
    30                         'categories_exc'  => '',   
     26                        'id'             => '',
     27                        'thead'          => '',
     28                        'disabled'       => '',
     29                        'categories_exc' => '',   
    3130                        ), $atts );
    3231
     
    3736
    3837function ron_woo_find_matching_product_variation( $product, $attributes ) {
    39 
    4038    foreach( $attributes as $key => $value ) {
    4139        if( strpos( $key, 'attribute_' ) === 0 ) {
     
    5957add_action("wp_ajax_check_choosed_var", "check_choosed_var");
    6058add_action("wp_ajax_nopriv_check_choosed_var", "check_choosed_var");
    61 
    6259function check_choosed_var(){
    6360   
     
    8582 
    8683  echo $cart_slug;
    87 
    8884  die();
    89 
    9085}
    9186
     
    116111                }
    117112                */
    118             $title = wc_attribute_label( $attribute['name'] ); 
    119        
    120               $data_array['att_title'][] = $title;
    121               $data_array['product_id'][] = $product->id;                       
    122        
     113        $title = wc_attribute_label($attribute['name']);           
     114        $data_array['att_title'][] = $title;
     115        $data_array['product_id'][] = $product->id;
    123116    }
    124117
     
    127120  $data .= '<thead><tr>'; 
    128121 
    129   if(!empty($allsets['thead']) && sizeof($table_head) > 0){
    130      
     122  if(!empty($allsets['thead']) && sizeof($table_head) > 0){ 
    131123   foreach($table_head as $th){
    132124    $data .= '<th>'.$th.'</th>';
    133    }
    134      
    135   } else {
    136      
    137     $data .= '<th>Title</th>';
    138  
     125   }     
     126  } else {   
     127    $data .= '<th>Title</th>'; 
    139128   foreach($data_array as $rok => $rov){
    140129     
     
    148137    }   
    149138   }
    150     $data .= '<th>BASKET</th>'; 
    151  
     139    $data .= '<th>BASKET</th>';   
    152140  }
    153141 
     
    286274         }
    287275       });   
    288   }
    289  
     276  } 
    290277</script>
    291278<?php } ?>
Note: See TracChangeset for help on using the changeset viewer.