greenlightsolutions
Forum Replies Created
-
I would, except that this is not an UM Story bug, but an Ultimate Member bug. I happened to encounter it when using the UM Story extension, but I imagine this problem might occur with any number of other extensions. And of all factors which came together to cause the problem, the above Ultimate Member code-fragment is one that is extremely easy to correct (as well as one that is obviously not correct in its current form). For this reason, I think this _is_ the proper forum to raise this issue.
I have now added support for the ‘WooCommerce Product Vendors’ plugin by modifying the file ‘Academe_Multiple_Packages.php’, replacing on 3 locations the lines
if (isset( $item['data']->post->post_author ) ) { $post_author = $item['data']->post->post_author; } else { $post_author = '-1'; }
by
if (method_exists("WC_Product_Vendors_Utils", "get_vendor_id_from_product") && ($vendor_id = WC_Product_Vendors_Utils::get_vendor_id_from_product($product_id))) { $post_author = "vendor:$vendor_id"; } else if (isset( $item['data']->post->post_author ) ) { $post_author = $item['data']->post->post_author; } else { $post_author = '-1'; }
This might be worth including in new updates for the ‘Package Configuration for WooCommerce’ plugin.
I should have clarified: the Product Vendors plugin I use is the plugin ‘WooCommerce Product Vendors’ by WooCommerce, from https://woocommerce.com/products/product-vendors/