Workaround relevanssi Closes #4873
This commit is contained in:
parent
38872b8536
commit
36de82e428
|
@ -17,7 +17,12 @@ class WC_Shortcode_Cart {
|
||||||
* @param array $atts
|
* @param array $atts
|
||||||
*/
|
*/
|
||||||
public static function output( $atts ) {
|
public static function output( $atts ) {
|
||||||
|
// Check cart class is loaded or abort
|
||||||
|
if ( is_null( WC()->cart ) ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Constants
|
||||||
if ( ! defined( 'WOOCOMMERCE_CART' ) ) {
|
if ( ! defined( 'WOOCOMMERCE_CART' ) ) {
|
||||||
define( 'WOOCOMMERCE_CART', true );
|
define( 'WOOCOMMERCE_CART', true );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue