Fix session/image UX and align post cost totals
This commit is contained in:
@@ -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
Reference in New Issue
Block a user