should_show_notices()) { wp_add_inline_style('admin-bar', $this->get_notice_styles()); } } /** * Check if any notices should be displayed * @return bool True if any notice should be shown */ private function should_show_notices() { if (!class_exists('WooCommerce')) { return true; } if (get_transient('aipt_database_error')) { return true; } if (get_transient('aipt_bulk_feature_notice')) { return true; } return false; } private function get_notice_styles() { return " .aipt-admin-notice { border: none !important; padding: 16px 20px !important; background: linear-gradient(135deg, #f8f9fa 0%, #f8f9fa 100%) !important; box-shadow: 0 2px 8px rgba(0,0,0,0.08) !important; margin: 20px 20px 20px 0 !important; border-radius: 8px !important; position: relative; border-left: 4px solid #2271b1 !important; } .aipt-admin-notice.notice-error { border-left-color: #d63638 !important; } .aipt-admin-notice.notice-info { border-left-color: #72aee6 !important; } .aipt-admin-notice h3 { font-size: 1.4em !important; font-weight: 600 !important; color: #1d2327 !important; margin: 0 0 0.4em 0 !important; display: flex !important; align-items: center !important; gap: 8px !important; } .aipt-admin-notice h3:before { content: '🤖'; font-size: 1.2em; } .aipt-admin-notice p { font-size: 14px !important; margin: 0 0 12px 0 !important; color: #50575e !important; line-height: 1.5 !important; } .aipt-admin-notice .button-container { display: flex !important; align-items: center !important; } .aipt-woo-button { display: inline-flex !important; align-items: center !important; gap: 8px !important; background: #2271b1 !important; color: #f8f9fa !important; padding: 8px 16px !important; border-radius: 4px !important; text-decoration: none !important; font-weight: 500 !important; transition: all 0.3s ease !important; border: none !important; box-shadow: 0 2px 4px rgba(34,113,177,0.2) !important; } .aipt-woo-button:hover { background: #135e96 !important; color: #f8f9fa !important; transform: translateY(-1px) !important; box-shadow: 0 4px 8px rgba(34,113,177,0.3) !important; } .aipt-woo-button:focus { box-shadow: 0 0 0 1px #f8f9fa, 0 0 0 3px #2271b1 !important; outline: none !important; } .aipt-woo-button:before { content: '🛍️'; font-size: 1.1em; } "; } public function check_woocommerce_dependency() { if ( class_exists( 'WooCommerce' ) ) { return; } $action = WooCommerceRequired::get_action(); if ( null === $action ) { return; } ?>