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

Bootstrap 4 Carosuel with ACF Repeater field

Did you check the Advanced Custom Fields documentation? You can check how the repeater fields work here: https://www.advancedcustomfields.com/resources/repeater/ You’ll see that you can do the following to show your ACF repeater images on the front-end: if ( have_rows(‘carousel_repeater’) ) : while ( have_rows(‘carousel_repeater’) ) : the_row(); $yourImage = get_sub_field(‘carosuel_image’); if ( $yourImage ) : echo … Read more

how can i update my postmeta without losing old data?

The saving logic should be like this <?php global $post; $get_my_meta = get_post_meta($post->ID, ‘my_meta’, true); $post_meta_name = get_post_meta($post->ID, ‘name-en’,true); $meta = [ ‘name’ => $post_meta_name, ‘chap’ => $season[‘quality_serie’] ]; $updatemeta = [ $get_my_meta, $meta ]; add_post_meta($post->ID, ‘my_meta’, $meta, true); ?> And the loop logic should be like this <?php $first_link = get_post_meta($post->ID, ‘my_meta’); if ($first_link) … Read more