Skip to content

Instantly share code, notes, and snippets.

View outrank-james's full-sized avatar

James outrank-james

View GitHub Profile
@outrank-james
outrank-james / woocommerce-reviews.php
Last active December 4, 2020 11:51
Bug fix for reviews.co.uk Woocommerce plugin, when WPLister integrated - products from eBay sales may not contain a sku, as they're not products from WooCommerce - this resolves that issue
public function processCompletedOrder($order_id)
{
update_post_meta($order_id, '_reviewscouk_status', 'processed');
$api_url = $this->getApiDomain();
$order = new WC_Order($order_id);
$items = $order->get_items();
$p = array();
foreach ($items as $row) {