Good morning @gopayplugins,
Thanks for the update, but I am not sure this problem has been fully resolved by the latest changes introduced.
Looking into the codebase, I see there’s been added following piece of code:
add_action( 'before_woocommerce_init', function() {
if ( class_exists( \Automattic\WooCommerce\Utilities\FeaturesUtil::class ) ) {
\Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__, true );
}
} );
This indeed does solve the problem in terms of getting rid of error message in admin and allowing to enable HPOS, but I don’t think the actual problematic parts in codebase has been updated to work reliably with HPOS.
Please see the following docs – part about ‘Functions for getting/setting order & order meta‘ – https://webkul.com/blog/woocommerce-plugin-high-performance-order-storage-compatible/
They are clearing saying there that functions such as update_post_meta, add_post_meta, delete_post_meta, get_post_meta
should be replaced.
So for instance class-gopay-gateway-api.php
line 447:
$gopay_transaction_id = get_post_meta( $order_id, 'GoPay_Transaction_id', true );
I believe this should be replaced by something like this (correct me if I am wrong @vasikgreif ):
$order = wc_get_order( $order_id );
$gopay_transaction_id = $order->get_meta( 'GoPay_Transaction_id', true );
Thanks for checking again.
-
This reply was modified 5 months, 2 weeks ago by BoUk.