Undefined variable: rest_prefix
kimmenbert opened this issue · 3 comments
Hi,
It seems like you have a $rest_prefix laying around that is not defined:
vipps-woocommerce/Vipps.class.php
Line 900 in b22a019
Thank you for reporting.
This is code borrowed from the Woo-Gutenberg-Blocks project; the method in question "is_request_to_store_api()
" is unfortunately protected
so it couldn't be called directly from the Vipps class ; and the rest_prefix got lost in an editing mishap.
The code will still work since rest_prefix will evaluate to "" here, but a fix will be present in the next version.
In case anyone wonders what the horrible hack following this test for is_store_api does, it is to support the new(ish) "All Products" gutenberg block where the interface is in flux. I'm tracking that issue; but at the moment the only way to add metadata such as "is express checkout purchasable" to the products in the block is to hide it in the products' description.
Hehe, oh yes! The WooCommerce gutenberg blocks and especially the all products block is not developer friendly at all.
Did something similar, but added a custom gutenberg block as inner block of the products in all products block. (Don’t go down that road).
Fixed in 1.6.2