Update the AXO warning messages

This commit is contained in:
Daniel Dudzic 2024-05-13 17:22:33 +02:00
parent 1f3bc01526
commit 2adc7d1289
No known key found for this signature in database
GPG key ID: 31B40D33E3465483
3 changed files with 30 additions and 10 deletions

View file

@ -71,6 +71,7 @@ $background-ident-color: #fbfbfb;
.highlight {
background: transparent;
color: #dba617;
font-weight: 600;
}
}

View file

@ -60,10 +60,13 @@ class CartCheckoutDetector {
* @return bool
*/
public static function has_elementor_checkout(): bool {
$elementor_widgets = self::get_elementor_widgets( wc_get_page_id( 'checkout' ) );
// Check if Elementor is installed and activated
if ( did_action( 'elementor/loaded' ) ) {
$elementor_widgets = self::get_elementor_widgets( wc_get_page_id( 'checkout' ) );
if ( $elementor_widgets ) {
return in_array( 'woocommerce-checkout-page', $elementor_widgets, true );
if ( $elementor_widgets ) {
return in_array( 'woocommerce-checkout-page', $elementor_widgets, true );
}
}
return false;