Automattic\WooCommerce\Internal\Admin\Schedulers
MailchimpScheduler::make_request()
Make an HTTP request to the API.
Метод класса: MailchimpScheduler{}
Хуков нет.
Возвращает
Разное
.
Использование
$MailchimpScheduler = new MailchimpScheduler(); $MailchimpScheduler->make_request( $store_email, $address );
- $store_email(строка) (обязательный)
- Email address to subscribe.
- $address(массив) (обязательный)
- Store address.
Код MailchimpScheduler::make_request() MailchimpScheduler::make request WC 9.3.3
public function make_request( $store_email, $address ) { if ( true === defined( 'WP_ENVIRONMENT_TYPE' ) && 'development' === constant( 'WP_ENVIRONMENT_TYPE' ) ) { $subscribe_endpoint = self::SUBSCRIBE_ENDPOINT_DEV; } else { $subscribe_endpoint = self::SUBSCRIBE_ENDPOINT; } return wp_remote_post( $subscribe_endpoint, array( 'user-agent' => 'WooCommerce/' . WC()->version . '; ' . get_bloginfo( 'url' ), 'method' => 'POST', 'body' => array( 'email' => $store_email, 'address' => $address, ), ) ); }