Just add another AND
(&&
) clause to the end of it.
<?php if ( is_woocommerce_activated() && isset( $woo_options['woocommerce_header_cart_link'] ) && 'true' == $woo_options['woocommerce_header_cart_link'] && sizeof( $woocommerce->cart->cart_contents ) !== 0) {...}
Probably best to take a look at some of the PHP tutorials or documentation around as you will be coming up against this type of syntax regularly.
Related Posts:
- I am having issue in divi woocomerce checkout module. (DIVI theme)
- loop to return tags in woocommerce in alphabetical order?
- How to correctly add Javascript in functions.php
- How to export/import theme customizer settings?
- Remove Woocommerce product link
- Check php version before theme activation
- One button to change all settings in theme customizer?
- How to remove “out of stock” variation options from size dropdown in woocommerce?
- Activate different theme for temporary preview
- Twitter feed is showing blank in WP site [closed]
- Woocommerce: How to override core functions in functions.php?
- How do I hardcode a WordPress shortcode into my theme?
- Get WooCommerce shipping methods programmatically
- Add a custom text field to WooCommerce admin product data “Variations”
- Translating add to cart woocommerce button [closed]
- Add attribute / custom attribute to product in woocommerce
- How do themes render caption texts in extended markup (e.g. “wp-caption” paragraphs)
- Help with some php math in WordPress
- How do I display a user’s previous orders as a select box option on a product?
- combine Code 1 with Code 2
- Adding nofollow to a PHP generated Nav
- Automated Cart Update With Alert Box Each Time
- Two Different Links for Same Product – WooCommerce [closed]
- WooCommerce/WordPress: how hide entire table form after submit (Admin Dashboard)?
- Show prices with tax in Woocommerce Mini Cart [closed]
- Reconfiguring WordPress site
- Problem with custom plugin using AJAX to pull info from php file
- Reload part of checkout on changed shipping method
- Woocommerce related product text
- Trying to build simple deposit code that hooks into woocommerce
- Is it possible to intercept all ajax requests and get the parameters and the returns?
- Function works when I don’t login to WordPress but when I login then it doesn’t work
- How to make products with no cost in WooCommerce
- Incorrect amount of posts returned when filtering related Woo products by custom taxonomy
- How do I remove the product thumbnail link from a specific div in Woocommerce? [closed]
- How to remove coupon dropdown feature
- Why in my theme I can’t see all the statics content under the posts?
- Add html link in functions.php files of the theme
- Add product to cart for user – WC()->cart->add_to_cart [closed]
- Seo Friendly Filter URLs
- how can i add class or span tag at sprintf?
- Display attribute on shop page after the title
- WooCommerce – Moving Product Price to the Left of Add to Cart Button [closed]
- How Do I Find & Remove H1 From Site-Title-Wrapper? [closed]
- WordPress WP_Query without query GET parameters
- Where to copy woocommerce files to in my custom theme to avoid editing the core plugin?
- Have Woocommerce show product price if id, when not logged in
- Problems clearing cache
- How to correctly load a different version of main menu based on the user language in WordPress? Is it a good solution?
- WordPress redirects page query parameter in URL
- Custom reduce stock code affecting date_modified – How to bypass?
- Publish button now showing content after saving
- How to get woocommerce orders with get_posts method in a shortcode
- error_log PHP error log found. This file must not be in the production version of the theme. (wordpress theme check plugin)
- WooCommerce Query Product Titles
- How to add a shortcode which runs a .php file for the current post
- Variant Item SKU as Product Code
- Run a sql (update) after 12 hours after the user login. Woocommerce users
- File from parent theme imported to child theme doesn’t work – any ideas?
- How can I change the background color of divs dynamically (depending on an order-status in woocommerce)?
- Add a new view on the Woocommerce account page
- Display all categories including sub categories under a list ul
- Unable to retrieve get_author_posts_url
- Use Search Term in html link and redirect
- Display post date also if the date it’s the same for each post
- How to get content on a blank basket/cart page in a custom theme with woocommerce
- WooCommerce REST API AJAX Auth – 401 response
- Looping through and combining calls to Woocommerce REST API
- How to import woocommerce custom fields data into another site?
- Woocommerce – if selected attribute term equals
- split 1 cart item into instock and back ordered
- How can I render more than multiple posts on template-parts with post formats
- Add the shortcodes from the enfold theme to the other theme
- Adding a widget under an ‘Add to Cart’ button through a PHP snippet
- How can i style “echo apply_filters”
- Woocommerce Related Product by 2 taxonomy
- Add custom ID attribute to all woocommerce products on archive pages
- How to properly create multiple conditions to redirect users roles to different pages
- Hide price excluding tax when price is empty
- Woocommerce variable products are being added to the card on the homepage (ajax)
- user update profile for custom code
- Woocommerce variation with radio button + price
- Display text of price (minus 20%) on every product page in a sentence.
- Getting the date_diff function return the difference in days
- Create a custom theme-specific page, invisible in the admin-panel?
- Using existing widget code! [closed]
- WordPress Website Featured Image Replacement Issue
- doubled content
- Themes with variable width or single columns? I want to display source code
- How to add custom checkout field in user details mail template
- How to get the rating value of each comment
- Add specific phrase after every product title including the discounted price? [closed]
- Display Sale Price Before Regular Price (WooCommerce)
- Errors while Loading Most Recent Version of jQuery
- Setting WooCommerce currency programmatically
- Product Category Page in Full Width
- After declaring woocommerce theme support products are no longer displayed
- WooCommerce – Show ‘Sales’ badge on variable products where only some variations have sales price [closed]
- How to create a container in php then customise it in CSS
- Find owner of coupon