Title: greencode's Replies - page 2 | WordPress.org

---

# greencode

  [  ](https://wordpress.org/support/users/greencode/)

 *   [Profile](https://wordpress.org/support/users/greencode/)
 *   [Topics Started](https://wordpress.org/support/users/greencode/topics/)
 *   [Replies Created](https://wordpress.org/support/users/greencode/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/greencode/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/greencode/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/greencode/engagements/)
 *   [Favorites](https://wordpress.org/support/users/greencode/favorites/)

 Search replies:

## Forum Replies Created

Viewing 15 replies - 16 through 30 (of 536 total)

[←](https://wordpress.org/support/users/greencode/replies/?output_format=md) [1](https://wordpress.org/support/users/greencode/replies/?output_format=md)
2 [3](https://wordpress.org/support/users/greencode/replies/page/3/?output_format=md)…
[34](https://wordpress.org/support/users/greencode/replies/page/34/?output_format=md)
[35](https://wordpress.org/support/users/greencode/replies/page/35/?output_format=md)
[36](https://wordpress.org/support/users/greencode/replies/page/36/?output_format=md)
[→](https://wordpress.org/support/users/greencode/replies/page/3/?output_format=md)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[LiteSpeed Cache] Premmerce Permalink Manager Issues with Litespeed](https://wordpress.org/support/topic/premmerce-permalink-manager-issues-with-litespeed/)
 *  Thread Starter [greencode](https://wordpress.org/support/users/greencode/)
 * (@greencode)
 * [10 months, 3 weeks ago](https://wordpress.org/support/topic/premmerce-permalink-manager-issues-with-litespeed/#post-18525693)
 * [@litetim](https://wordpress.org/support/users/litetim/) Frustratingly it’s happening
   completely randomly. The report number is **MVMRMIVG**
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WPC External Variations for WooCommerce] Sorry, this product is unavailable. Please choose a different combination](https://wordpress.org/support/topic/sorry-this-product-is-unavailable-please-choose-a-different-combination-18/)
 *  Thread Starter [greencode](https://wordpress.org/support/users/greencode/)
 * (@greencode)
 * [11 months, 1 week ago](https://wordpress.org/support/topic/sorry-this-product-is-unavailable-please-choose-a-different-combination-18/#post-18504182)
 * Hi [@janilyn409](https://wordpress.org/support/users/janilyn409/). I’ve tested
   with WooCommerce 9.8.5 and the latest version of your plugin 1.0.5 and everything
   appears to be working as it should. Thanks for resolving the issue. Very much
   appreciated.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Friendly User Agent for WooCommerce] HPOS compatibility](https://wordpress.org/support/topic/hpos-compatibility-100/)
 *  [greencode](https://wordpress.org/support/users/greencode/)
 * (@greencode)
 * [12 months ago](https://wordpress.org/support/topic/hpos-compatibility-100/#post-18467757)
 * [@windischweb](https://wordpress.org/support/users/windischweb/) [@katmac_aus](https://wordpress.org/support/users/katmac_aus/)
   With the help of ChatGPT and Claude.ai I’ve managed to make this HPOS compatible.
   If you’re comfortable editing the plugin files then replace all of the content
   in the woo-friendly-user-agent.php file with this
 *     ```wp-block-code
       <?php/*** Plugin Name: Friendly User Agent for WooCommerce* Plugin URI:* Description: Show the order user agent in a user friendly view on the orders page.* Version: 1.4.0* Tested up to: 6.5* Requires PHP: 5.6* WC requires at least: 3.0.0* WC tested up to: 8.0.0* Author: Blaze Concepts* Author URI: https://www.blazeconcepts.co.uk/** Text Domain: woo-friendly-user-agent**/if ( ! defined( 'ABSPATH' ) ) {  exit; // Exit if accessed directly.}/** * Declare HPOS compatibility */add_action( 'before_woocommerce_init', function() {  if ( class_exists( '\Automattic\WooCommerce\Utilities\FeaturesUtil' ) ) {    \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__, true );  }} );/** * Enable Languages * * @return void */add_action( 'init', 'blz_fua_load_plugin_textdomain' );function blz_fua_load_plugin_textdomain() {	$domain = 'woo-friendly-user-agent';	$locale = apply_filters( 'plugin_locale', get_locale(), $domain );	load_plugin_textdomain( $domain, FALSE, basename( dirname( __FILE__ ) ) . '/languages/' );}include_once dirname( __FILE__ ) . '/parse-user-agent.php';/** * Add Friendly User Agent to single order page * * @param [object] $order * @return void */add_action( 'woocommerce_admin_order_data_after_billing_address', 'blz_fua_show_user_agent_admin_order' );function blz_fua_show_user_agent_admin_order($order) {  $agent = $order->get_customer_user_agent();  if ( !isset($agent) || empty($agent) ) {    // Not set don't output  } else {    echo '<div class="single_order_ua"><strong>'.__('Customer User Agent','woo-friendly-user-agent').':</strong><br> '.blz_fua_getFriendlyAgent($agent).'</div>';  }}/** * Add Friendly User Agent column to orders list page (legacy tables) * * @param [array] $columns * @return $new_columns */add_filter('manage_edit-shop_order_columns', 'blz_fua_add_order_agent_column_header', 20);function blz_fua_add_order_agent_column_header( $columns ) {  $new_columns = array();  foreach ( $columns as $column_name => $column_info ) {    $new_columns[ $column_name ] = $column_info;    if ( 'order_total' === $column_name ) {      $new_columns['order_agent'] = __( 'User Agent', 'woo-friendly-user-agent' );    }  }  return $new_columns;}/** * Add Friendly User Agent column to orders list page (HPOS) */add_filter( 'woocommerce_shop_order_list_table_columns', 'blz_fua_add_order_agent_column_header_hpos', 20 );function blz_fua_add_order_agent_column_header_hpos( $columns ) {  $new_columns = array();  foreach ( $columns as $column_name => $column_info ) {    $new_columns[ $column_name ] = $column_info;    if ( 'total' === $column_name ) {      $new_columns['order_agent'] = __( 'User Agent', 'woo-friendly-user-agent' );    }  }  return $new_columns;}/** * Display Friendly User Agent in column on orders list page (legacy tables) * * @param [string] $column * @return void */add_action('manage_shop_order_posts_custom_column', 'blz_fua_add_order_agent_column_content');function blz_fua_add_order_agent_column_content( $column ) {  global $post;  if ( 'order_agent' === $column ) {    $order = wc_get_order( $post->ID );    $agent = $order->get_customer_user_agent();    if ( !isset($agent) || empty($agent) ) {      $output = __('Not set','woo-friendly-user-agent');    } else {      $output = blz_fua_getFriendlyAgent($agent);    }    echo $output;  }}/** * Display Friendly User Agent in column on orders list page (HPOS) */add_action( 'manage_woocommerce_page_wc-orders_custom_column', 'blz_fua_add_order_agent_column_content_hpos', 10, 2 );function blz_fua_add_order_agent_column_content_hpos( $column, $order ) {  if ( 'order_agent' === $column ) {    $agent = $order->get_customer_user_agent();    if ( !isset($agent) || empty($agent) ) {      $output = __('Not set','woo-friendly-user-agent');    } else {      $output = blz_fua_getFriendlyAgent($agent);    }    echo $output;  }}/** * Get Friendly User Agent and return output * * @param [string] $agent * @return $output */function blz_fua_getFriendlyAgent($agent) {  $friendlyagent = blz_fua_parse_user_agent($agent);    $output = '';    if(isset($friendlyagent['platform']) && !empty($friendlyagent['platform'])){        $output .= __('Platform','woo-friendly-user-agent').': '.$friendlyagent['platform'];    } else {        $output .= __('Platform: Not known','woo-friendly-user-agent');    }    if(isset($friendlyagent['imgplatform']) && !empty($friendlyagent['imgplatform'])){        $output .= '<img src="'.$friendlyagent['imgplatform'].'" width="15" height="15" />';    }    $output .= '<br>';    if(isset($friendlyagent['browser']) && !empty($friendlyagent['browser'])){        $output .= __('Browser','woo-friendly-user-agent').': '.$friendlyagent['browser'];    } else {        $output .= __('Browser: Not known','woo-friendly-user-agent');    }    if(isset($friendlyagent['imgbrowser']) && !empty($friendlyagent['imgbrowser'])){        $output .= '<img src="'.$friendlyagent['imgbrowser'].'" width="15" height="15" />';    }    $output .= '<br>';    if(isset($friendlyagent['version']) && !empty($friendlyagent['version'])){        $output .= __('Version','woo-friendly-user-agent').': '.$friendlyagent['version'];    }  return $output;}/** * Add admin CSS * * @return void */add_action( 'admin_print_styles', 'blz_fua_add_order_agent_column_style' );function blz_fua_add_order_agent_column_style() {    $css = '.post-type-shop_order .wp-list-table td.column-order_agent,             .woocommerce-page.page-wc-orders .wp-list-table .order_agent.column-order_agent {               width: 9%;               line-height: 20px;             }            .post-type-shop_order .wp-list-table td.column-order_agent img,            .woocommerce-page.page-wc-orders .wp-list-table .order_agent.column-order_agent img {               vertical-align: middle;               margin-left: 5px;             }            .post-type-shop_order .single_order_ua,            .woocommerce-page.page-wc-orders .single_order_ua {               line-height: 20px;             }            .post-type-shop_order .single_order_ua img,            .woocommerce-page.page-wc-orders .single_order_ua img {               vertical-align: middle;               margin-left: 5px;             }';    wp_add_inline_style( 'woocommerce_admin_styles', $css );}
       ```
   
 * Basically added Added HPOS Compatibility Declaration
 *     ```wp-block-code
       add_action( 'before_woocommerce_init', function() {  if ( class_exists( '\Automattic\WooCommerce\Utilities\FeaturesUtil' ) ) {    \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__, true );  }} );
       ```
   
 * Added Support for HPOS Order List Columns
 *     ```wp-block-code
       add_filter( 'woocommerce_shop_order_list_table_columns', 'blz_fua_add_order_agent_column_header_hpos', 20 );
       ```
   
 * Added HPOS Order Column Content Handler
 *     ```wp-block-code
       add_action( 'manage_woocommerce_page_wc-orders_custom_column', 'blz_fua_add_order_agent_column_content_hpos', 10, 2 );
       ```
   
 * And Updated CSS for HPOS Compatibility (Added CSS selectors to target both traditional
   and HPOS order list views). Updated Version Number and WC Tested Up To (Increased
   version to 1.4.0 and updated WC tested up to 8.0.0)
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooCommerce] Fatal error BlockPatterns.php:251](https://wordpress.org/support/topic/fatal-error-blockpatterns-php251/)
 *  Thread Starter [greencode](https://wordpress.org/support/users/greencode/)
 * (@greencode)
 * [1 year ago](https://wordpress.org/support/topic/fatal-error-blockpatterns-php251/page/2/#post-18452960)
 * Hi [@lovingbro](https://wordpress.org/support/users/lovingbro/) Thanks for this
   but it’s not just sites that disable the Legacy REST API plugin as other users
   are reporting i.e. some users are reporting the issue after making no updates
   or deactivating any plugins! I’ll keep an eye on the github you linked to.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooCommerce] Fatal error](https://wordpress.org/support/topic/fatal-error-4860/)
 *  [greencode](https://wordpress.org/support/users/greencode/)
 * (@greencode)
 * [1 year ago](https://wordpress.org/support/topic/fatal-error-4860/#post-18452883)
 * It’ll be the same as the other people that have reported this issue. See other
   posts in this support forum.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooCommerce] Fatal error BlockPatterns.php:251](https://wordpress.org/support/topic/fatal-error-blockpatterns-php251/)
 *  Thread Starter [greencode](https://wordpress.org/support/users/greencode/)
 * (@greencode)
 * [1 year ago](https://wordpress.org/support/topic/fatal-error-blockpatterns-php251/#post-18452749)
 * [@mosesmedh](https://wordpress.org/support/users/mosesmedh/) Thanks for the quick
   update. Looking forward to a permanent resolution.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooCommerce] Fatal error BlockPatterns.php:251](https://wordpress.org/support/topic/fatal-error-blockpatterns-php251/)
 *  Thread Starter [greencode](https://wordpress.org/support/users/greencode/)
 * (@greencode)
 * [1 year ago](https://wordpress.org/support/topic/fatal-error-blockpatterns-php251/#post-18452713)
 * There’s a lot of people [reporting it now on GitHub](https://github.com/woocommerce/woocommerce/issues?q=is%3Aissue%20state%3Aopen%20legacy)
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooCommerce] Fatal error BlockPatterns.php:251](https://wordpress.org/support/topic/fatal-error-blockpatterns-php251/)
 *  Thread Starter [greencode](https://wordpress.org/support/users/greencode/)
 * (@greencode)
 * [1 year ago](https://wordpress.org/support/topic/fatal-error-blockpatterns-php251/#post-18452685)
 * Edit the code here
 *     ```wp-block-code
       wp-content/plugins/woocommerce/src/Blocks/BlockPatterns.php
       ```
   
 * Replace this
 *     ```wp-block-code
       if ( strpos( $category['title'], $prefix ) !== false ) {
       ```
   
 * with this
 *     ```wp-block-code
       if ( isset( $category['title'] ) && is_string( $category['title'] ) && strpos( $category['title'], $prefix ) !== false ) {
       ```
   
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WPC External Variations for WooCommerce] Sorry, this product is unavailable. Please choose a different combination](https://wordpress.org/support/topic/sorry-this-product-is-unavailable-please-choose-a-different-combination-18/)
 *  Thread Starter [greencode](https://wordpress.org/support/users/greencode/)
 * (@greencode)
 * [1 year ago](https://wordpress.org/support/topic/sorry-this-product-is-unavailable-please-choose-a-different-combination-18/#post-18444614)
 * Hi. Any news on when an update will be released as I’d really like to get woocommerce
   onto the latest version but unable to do so until this is fixed. Thanks.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooCommerce PayPal Payments] Apple Pay & Google Pay not working – Required fields](https://wordpress.org/support/topic/apple-pay-google-pay-not-working-required-fields/)
 *  Thread Starter [greencode](https://wordpress.org/support/users/greencode/)
 * (@greencode)
 * [1 year ago](https://wordpress.org/support/topic/apple-pay-google-pay-not-working-required-fields/#post-18439080)
 * Hi. I’ve managed to fix the issue. If you have “Hide shipping costs until an 
   address is entered” checked then it doesn’t work. This has to be unchecked. For
   others that encounter this issue the setting is located: WooCommerce > Settings
   > Shipping > Shipping Settings – Calculcation
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Disable Bloat for WordPress & WooCommerce] Payment gateway screen blank when Disable Marketing selected](https://wordpress.org/support/topic/payment-gateway-screen-blank-after-when-disable-marketing-selected-2/)
 *  [greencode](https://wordpress.org/support/users/greencode/)
 * (@greencode)
 * [1 year ago](https://wordpress.org/support/topic/payment-gateway-screen-blank-after-when-disable-marketing-selected-2/#post-18436235)
 * Having the same issue. Hopefully a fix will come soon.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WPC External Variations for WooCommerce] Sorry, this product is unavailable. Please choose a different combination](https://wordpress.org/support/topic/sorry-this-product-is-unavailable-please-choose-a-different-combination-18/)
 *  Thread Starter [greencode](https://wordpress.org/support/users/greencode/)
 * (@greencode)
 * [1 year ago](https://wordpress.org/support/topic/sorry-this-product-is-unavailable-please-choose-a-different-combination-18/#post-18428983)
 * [@janilyn409](https://wordpress.org/support/users/janilyn409/) thanks for this.
   I’ll look forward to the update. I’ll stay on 9.7.1. for now.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WPC External Variations for WooCommerce] Sorry, this product is unavailable. Please choose a different combination](https://wordpress.org/support/topic/sorry-this-product-is-unavailable-please-choose-a-different-combination-18/)
 *  Thread Starter [greencode](https://wordpress.org/support/users/greencode/)
 * (@greencode)
 * [1 year ago](https://wordpress.org/support/topic/sorry-this-product-is-unavailable-please-choose-a-different-combination-18/#post-18420098)
 * I can confirm that it has broken in 9.8.1. I’ve reverted back to 9.7.1 and that
   works okay.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WPForms - Easy Form Builder for WordPress - Contact Forms, Payment Forms, Surveys, & More] ACF field to hidden form field](https://wordpress.org/support/topic/acf-field-to-hidden-form-field/)
 *  Thread Starter [greencode](https://wordpress.org/support/users/greencode/)
 * (@greencode)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/acf-field-to-hidden-form-field/#post-18347020)
 * [@amjadali688](https://wordpress.org/support/users/amjadali688/) apologies, I
   thought I’d replied. Thanks for your help with this. This worked perfectly. Great
   plugin btw.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[EWWW Image Optimizer] Fatal error: Maximum execution time of 30 seconds exceeded](https://wordpress.org/support/topic/fatal-error-maximum-execution-time-of-30-seconds-exceeded-31/)
 *  Thread Starter [greencode](https://wordpress.org/support/users/greencode/)
 * (@greencode)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/fatal-error-maximum-execution-time-of-30-seconds-exceeded-31/#post-18306710)
 * [@adamewww](https://wordpress.org/support/users/adamewww/) Thanks for the quick
   response. I’ve increased that to 60 seconds, so i’ll see how that goes.

Viewing 15 replies - 16 through 30 (of 536 total)

[←](https://wordpress.org/support/users/greencode/replies/?output_format=md) [1](https://wordpress.org/support/users/greencode/replies/?output_format=md)
2 [3](https://wordpress.org/support/users/greencode/replies/page/3/?output_format=md)…
[34](https://wordpress.org/support/users/greencode/replies/page/34/?output_format=md)
[35](https://wordpress.org/support/users/greencode/replies/page/35/?output_format=md)
[36](https://wordpress.org/support/users/greencode/replies/page/36/?output_format=md)
[→](https://wordpress.org/support/users/greencode/replies/page/3/?output_format=md)