HPOS Compatibility issue
-
Hi, the latest version of the plugin hs declared compatibility with HPOS, however I’m seeing some issues:
2023/08/11 10:06:46 [error] 79990#79990: *339119 FastCGI sent in stderr: “PHP message: PHP Warning: Attempt to read property “ID” on null in /www/oremcommx_742/public/wp-content/plugins/funnel-builder-pro/modules/one-click-upsells/admin/includes/class-wfocu-upstroke-timeline.php on line 30″ while reading response header from upstream, client: 142.113.240.151, server: https://www.orem.com.mx, request: “GET /wp-admin/admin.php?page=wc-orders&action=edit&id=260123 HTTP/2.0”, upstream: “fastcgi://unix:/var/run/php8.1-fpm-oremcommx.sock:”, host: “orem.com.mx:37800”, referrer: “https://orem.com.mx/wp-admin/admin.php?page=wc-orders”
This code is not HPOS compatible, usage of post->id is no longer available and the way to register the metabox needs to be adjusted as well.
/** * Metabox callback function * Adding upstroke metabox to show upstroke activity timeline in sidebar of order edit page */ public function wfocu_register_upstroke_reports_meta_boxes() { global $post; $order_id = $post->ID; $funnel_id = get_post_meta( $order_id, '_wfocu_funnel_id', true ); if ( $funnel_id > 0 ) { add_meta_box( 'wfocu_upstroke_reports_metabox', __( 'FunnelKit Timeline', 'woofunnels-upstroke-power-pack' ), array( $this, 'wfocu_upstroke_reports_metabox_callback', ), 'shop_order', 'side' ); } }
- The topic ‘HPOS Compatibility issue’ is closed to new replies.