Display Results of SQL Query on WP site

I see the error described above. I am assuming I need to do a foreach or while command – but all attempts to use these have not yielded results. Yes, shortcodes return strings, not arrays/lists. You need to convert your array/list into a single string. However, get_var assumes a single result. If you want multiple … Read more

Create a new account on site B with data from the purchase of site A

I managed to solve via CURL requests via PHP, the code is as follows. functions.php of site A: add_action( ‘woocommerce_order_status_completed’, ‘change_role_on_purchase’ ); function change_role_on_purchase( $order_id ) { $order = new WC_Order( $order_id ); $items = $order->get_items(); foreach ( $items as $item_id => $item ) { $product_id = $item->get_variation_id() ? $item->get_variation_id() : $item->get_product_id(); if ( $product_id … Read more