Fix session/image UX and align post cost totals

This commit is contained in:
Dwindi Ramadhana
2026-05-28 00:51:34 +07:00
parent d2c10756ab
commit 2c10e73ca4
5 changed files with 4022 additions and 355 deletions

View File

@@ -77,16 +77,10 @@ class WP_Agentic_Writer_Admin_Columns {
return;
}
global $wpdb;
$table_name = $wpdb->prefix . 'wpaw_cost_tracking';
// Get total cost for this post
$total_cost = $wpdb->get_var(
$wpdb->prepare(
"SELECT SUM(cost) FROM {$table_name} WHERE post_id = %d",
$post_id
)
);
$total_cost = 0.0;
if ( class_exists( 'WP_Agentic_Writer_Cost_Tracker' ) ) {
$total_cost = WP_Agentic_Writer_Cost_Tracker::get_instance()->get_session_total( $post_id );
}
if ( $total_cost && $total_cost > 0 ) {
// Color code based on cost

File diff suppressed because it is too large Load Diff