TC.K
Forum Replies Created
-
I unable to use the woo price filter hence I use the link method instead. But it is still not workin.
currently I hide the filter by css to temporary hide it from customer. You can get it back by changing the css.I tested it in a staging website which required login to view it. How do I send you the credential?
Forum: Plugins
In reply to: [WooCommerce] custom query to add billing phone field to admin customer list@xue28 this is just the php part of the customization. You will still need the js (react) side of codes.
the source code of the js is like this:
import { addFilter } from '@wordpress/hooks'; const addTableColumn = reportTableData => { if ( 'customers' !== reportTableData.endpoint ) { return reportTableData; } reportTableData.headers.push({label:'Phone', key:'phone'}) const newRows = reportTableData.rows.map( ( row, index ) => { const item = reportTableData.items.data[ index ]; let pobj = { display: item.phone, value: item.phone, } row.push(pobj) return row ; } ); reportTableData.rows = newRows; return reportTableData; }; addFilter( 'woocommerce_admin_report_table', 'append-customer-phone', addTableColumn );
But in order this to works, you need to setup your js file correctly. This depends on how your file structure, which a rather big topic to discuss here. You can read from here https://developer.woocommerce.com/2020/02/20/extending-wc-admin-reports/ on how to create an extension for woocommerce.
ok…thank you very much.
yes. I have litespeed server.
so, when will the feature be available?
Ok, got it working. It was the fix.php that caused the problem.
Thanks for the helps.
the fix.php is to fix whitespaces appeared in the header in the sitemap.
You can refer to this https://idreeselahi.in/sitemap-error-fixed/
Forum: Plugins
In reply to: [WooCommerce] custom query to add billing phone field to admin customer listI got it working.
This is the snippet that I come up with if someone interested.
add_filter( 'woocommerce_admin_report_columns', 'customized_table_columns', 10, 3 ); function customized_table_columns( $report_columns, $context, $table_name ) { if ( $context !== 'customers' ) { return $report_columns; } global $wpdb; $statbl = $wpdb->prefix.'wc_order_stats'; $orders_count = 'SUM( CASE WHEN '.$statbl.'.parent_id = 0 THEN 1 ELSE 0 END )'; $total_spend = 'SUM( '.$statbl.'.total_sales )'; $narr = array( 'id' => "{$table_name}.customer_id as id", 'user_id' => $table_name.'.user_id', 'username' => $table_name.'.username', 'name' => "CONCAT_WS( ' ', {$table_name}.first_name, {$table_name}.last_name ) as name", 'email' => $table_name.'.email', 'phone' => "m.meta_value as phone", 'country' => $table_name.'.country', 'city' => $table_name.'.city', 'state' => $table_name.'.state', 'postcode' => $table_name.'.postcode', 'date_registered' => $table_name.'.date_registered', 'date_last_active' => 'IF( '.$table_name.'.date_last_active <= "0000-00-00 00:00:00", NULL, '.$table_name.'.date_last_active ) AS date_last_active', 'date_last_order' => "MAX( {$wpdb->prefix}wc_order_stats.date_created ) as date_last_order", 'orders_count' => "{$orders_count} as orders_count", 'total_spend' => "{$total_spend} as total_spend", 'avg_order_value' => "CASE WHEN {$orders_count} = 0 THEN NULL ELSE {$total_spend} / {$orders_count} END AS avg_order_value", ); return $narr; } add_filter( 'woocommerce_analytics_clauses_join_customers_subquery', 'add_join_subquery' ); function add_join_subquery($clauses){ global $wpdb; $tbl = $wpdb->usermeta; $ctbl = $wpdb->prefix.'wc_customer_lookup'; $order_stats_table_name = $wpdb->prefix . 'wc_order_stats'; $clauses[] = "JOIN {$tbl} m ON {$ctbl}.customer_id = m.user_id AND m.meta_key = 'billing_phone'"; return $clauses; }
Mine also got problems after update. But the error is different:
2023-01-31T17:45:08+00:00 CRITICAL Class MailPoet\WooCommerce\MailPoetTask contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (Automattic\WooCommerce\Admin\Features\OnboardingTasks\Task::get_parent_id) in xxx/htdocs/wp-content/plugins/mailpoet/lib/WooCommerce/MailPoetTask.php on line 0
Forum: Themes and Templates
In reply to: [Blockbase] How to make the header sticky?ok…no problem. Thanks.
Forum: Themes and Templates
In reply to: [Blockbase] How to make the header sticky?I know how to use css to do it. I just wonder if it is supported out of the box
Forum: Fixing WordPress
In reply to: Block editor blank after Update to latest version WPI solved it.
It was the cache issue.
Clearing the browser cache fixed the issue.Yes, all of the emails are valid email.
Somehow it still not working.- This reply was modified 2 years, 10 months ago by TC.K.
Forum: Plugins
In reply to: [Payment Plugins for Stripe WooCommerce] Conditional payment methodsi found the problem, it was not from this plugin.
Thanks for the help though.Forum: Plugins
In reply to: [Payment Plugins for Stripe WooCommerce] Conditional payment methodsOh, my mistake.
It iswc_stripe_payment_gateways
hook.But neither
woocommerce_available_payment_gateways
andwc_stripe_payment_gateways
works. Still having the same 0 amount issue from the cart object.