method_exists()
-
Hi there
I get an error with multiple code snippets when using the plugin.
method_exists(): Argument #1 ($object_or_class) must be of type object|string, array given
An example code snippet being used is:
function search_above_shop_loop() { $term = get_queried_object(); $taxonomy = isset($term->taxonomy) ? $term->taxonomy : null; if( $taxonomy && ! in_array( $taxonomy, array( 'product_cat', 'product_brand' ) ) ){ echo '<div class="shop_search_bar">'.do_shortcode('[wd_asp id=1]').'</div>'; } } add_action( 'woocommerce_before_shop_loop', 'search_above_shop_loop', 10 );
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘method_exists()’ is closed to new replies.