Skip to content

Instantly share code, notes, and snippets.

/gist:6504983
Created Sep 10, 2013

Embed
What would you like to do?
Picker function resides in: class WC_Swatch_Picker
public function picker() {
global $woocommerce;
?>
<table class="variations-table" cellspacing="0">
<tbody>
<?php
$loop = 0;
foreach ($this->attributes as $name => $options) : $loop++;
?>
<tr>
<td><label for="<?php echo sanitize_title($name); ?>"><?php echo $woocommerce->attribute_label($name); ?></label></td>
<td>
<?php
if (isset($this->swatch_type_options[sanitize_title($name)])) {
$picker_type = $this->swatch_type_options[sanitize_title($name)]['type'];
if ($picker_type == 'default') {
$this->render_default(sanitize_title($name), $options);
} else {
$this->render_picker(sanitize_title($name), $options);
}
} else {
$this->render_default(sanitize_title($name), $options);
}
?>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.