lundi 29 décembre 2014

How can I have a function in my theme run after a plugin's function?


I am not sure if my function is firing before another funciton or if I am having issues with the $this variable when I am extending my class.


I am creating a function in my functions.php file. Here's a link to my function.


The specific function is extending a class that is an extension for WooCommerce. The template page calls the function like so:



<?php
$ssi_woocommerce_variation_control_output = new SSi_WC_Swatch_Picker( $product->id, $attributes, $variation_params['selected_attributes'] );
print_r($ssi_woocommerce_variation_control_output);
$ssi_woocommerce_variation_control_output->picker();
?>


The print_r output will produce the array content to the page. However I get this:



Start the Loop

Notice: Undefined property: SSi_WC_Swatch_Picker::$attributes in /my_url/wp-content/themes/my-theme/functions.php on line 13

Warning: Invalid argument supplied for foreach() in /my_url/wp-content/themes/my-theme/functions.php on line 13

End the Loop




Aucun commentaire:

Enregistrer un commentaire