Notice: These forums are now retired and closed. For active support, please Submit a Ticket or visit our official WordPress.org community pages.
Kadence Theme | Kadence Blocks | Starter Templates | WooCommerce Email Designer | Ascend | Virtue | Pinnacle

Attach multiple sales pages to a single cloud

Home / Forums / Membership Forums / Attach multiple sales pages to a single cloud

This topic is: Resolved
[Resolved]
August 3, 2023 at 6:07 am

We are in a situation where we need to attach multiple sales pages to a cloud server (there is a reason why we need to do this).

I’ve tried to convert the code to 3 domain validation, which should be fine in principle, but it doesn’t work: it always only validates the first domain, and gives an error when attaching the cloud to the others – even though there is a valid key.

What am I messing up? Or is this not how it should work?

I followed this documentation, which is good for 1 sales page:

And this is my new code snippet that doesn’t work:

// Define woocommerce site.
$api_url = ‘
$api_url_2 = ‘
$api_url_3 = ‘

$request_uri = $api_url . ‘?’ . http_build_query( $args );
$data = wp_safe_remote_get( $request_uri );
// Couldn’t Access the api site.
if ( is_wp_error( $data ) || $data[‘response’][‘code’] != 200 ) {

$api_url = $api_url_2;
$request_uri = $api_url . ‘?’ . http_build_query( $args );
$data = wp_safe_remote_get( $request_uri );

if ( is_wp_error( $data ) || $data[‘response’][‘code’] != 200 ) {

$api_url = $api_url_3;
$request_uri = $api_url . ‘?’ . http_build_query( $args );
$data = wp_safe_remote_get( $request_uri );

if ( is_wp_error( $data ) || $data[‘response’][‘code’] != 200 ) {
return $access;
}

}

}

Thanks in advance if you can help! 🙂

Sandor

  • The forum ‘Membership Forums’ is closed to new topics and replies.