Forum Replies Created

Viewing 8 replies - 31 through 38 (of 38 total)
  • For the site I needed this I already had a custom plugin so I added this code to the main file of the plugin. If you used a blank plugin example, you would place this code in <plugin-name>.php. I believe it would also work if you added it to functions.php of a theme.

    I found my issue. Variations are not displayed if they have a blank price or are out of stock. I’m not sure how this changed with 2.0.4 but this is when I started to experience the issue. My variations had no price because they were set by a custom plugin that set prices at the category level.

    Adding this to my plugin resolved the issue by bypassing the blank price and in stock check:

    add_filter('woocommerce_product_is_visible', 'product_variation_always_shown', 10, 2);
    function product_variation_always_shown($is_visible, $id){
        return true;
    }

    I’ve noticed the same behavior with the 2.0.4 upgrade. I can see the options are being echoed by variables.php when viewing the page source. It looks like during the page load javascript must remove it because they are not their when I inspect the element in chrome.

    I’m digging through the javascript to try to find code that could do this. Does someone with more familiarity with the woocommerce javascript have an idea of what portion of the code could remove options from the variation drop-down?

    My issue was I have a custom shipping rate class that extends WC_Shipping_Method. When I didn’t load this the site loaded. I’m not sure the root of the problem but will have to take a closer look.

    Same issue with my test site too.

    Here are the erros from the php error log:

    24-Mar-2013 11:44:50] PHP Warning:  include(shortcodes/shortcode-init.php) [<a href='function.include'>function.include</a>]: failed to open stream: No such file or directory in <site root directory>/wp-content/plugins/woocommerce/woocommerce.php on line 238
    [24-Mar-2013 11:44:50] PHP Warning:  include() [<a href='function.include'>function.include</a>]: Failed opening 'shortcodes/shortcode-init.php' for inclusion (include_path='.:/Applications/MAMP/bin/php5.2/lib/php') in <site root directory>/wp-content/plugins/woocommerce/woocommerce.php on line 238
    [24-Mar-2013 11:44:50] PHP Warning:  include(widgets/widget-init.php) [<a href='function.include'>function.include</a>]: failed to open stream: No such file or directory in <site root directory>/wp-content/plugins/woocommerce/woocommerce.php on line 171
    [24-Mar-2013 11:44:50] PHP Warning:  include() [<a href='function.include'>function.include</a>]: Failed opening 'widgets/widget-init.php' for inclusion (include_path='.:/Applications/MAMP/bin/php5.2/lib/php') in <site root directory>/wp-content/plugins/woocommerce/woocommerce.php on line 171
    [24-Mar-2013 11:44:50] PHP Warning:  include(classes/class-wc-product.php) [<a href='function.include'>function.include</a>]: failed to open stream: No such file or directory in <site root directory>/wp-content/plugins/woocommerce/woocommerce.php on line 174
    [24-Mar-2013 11:44:50] PHP Warning:  include() [<a href='function.include'>function.include</a>]: Failed opening 'classes/class-wc-product.php' for inclusion (include_path='.:/Applications/MAMP/bin/php5.2/lib/php') in <site root directory>/wp-content/plugins/woocommerce/woocommerce.php on line 174
    [24-Mar-2013 11:44:50] PHP Fatal error:  Class 'WC_Product' not found in <site root directory>/wp-content/plugins/woocommerce/classes/class-wc-product-variation.php on line 16

    I apologize for digging up an old post but since nobody responded to your request I thought I would mention the plugin I just released. The plugin is called “Instruct” and is available here. It basically simplifies creating howtos, manuals, recipes, etc. Hope it helps.

    This worked. Thanks!

    Maybe I’m missing something but I don’t really see the logic behind this. At what point would you want all your deleted photos to show up every time you upload a new image? It seems like a bug to me.

    I’m having this issue too and it seems to be a bug. Have you had any luck fixing this problem?

Viewing 8 replies - 31 through 38 (of 38 total)