Skip to content

PHP issues with WooCommerce integration in the Theme #35

@d4mation

Description

@d4mation
Deprecated: Function create_function() is deprecated in /srv/www/nbs/public_html/wp-content/themes/napoleonbeesupply-theme-2017/library/woocommerce.php on line 29

Notice: Trying to get property 'term_id' of non-object in /srv/www/nbs/public_html/wp-content/themes/napoleonbeesupply-theme-2017/library/woocommerce.php on line 123

The first one seems to be due to your use of create_function when setting the number of columns. A better way to do this while using an anonymous callback would be:

// Change number of columns on product pages
add_filter( 'woocommerce_product_thumbnails_columns', function( $columns ) {
    return 3; 
} );

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions