WC_Email_Customer_Abandoned_Cart_Recovery::get_recovery_urlpublicWC 11.0.0

Get the URL the recovery email should send the customer to.

Returns the order's pay endpoint, which resumes the checkout for the pending order. A future iteration may swap this for a single-use signed URL with explicit expiry (see woocommerce_abandoned_cart_recovery_url

Метод класса: WC_Email_Customer_Abandoned_Cart_Recovery{}

Хуки из метода

Возвращает

Строку.

Использование

$WC_Email_Customer_Abandoned_Cart_Recovery = new WC_Email_Customer_Abandoned_Cart_Recovery();
$WC_Email_Customer_Abandoned_Cart_Recovery->get_recovery_url();

Список изменений

С версии 11.0.0 Введена.

Код WC_Email_Customer_Abandoned_Cart_Recovery::get_recovery_url() WC 11.0.1

public function get_recovery_url() {
	if ( ! $this->object instanceof WC_Order ) {
		return '';
	}

	/**
	 * Filter the URL included in the abandoned cart recovery email.
	 *
	 * @since 11.0.0
	 *
	 * @param string   $url   Default: the pending order's pay endpoint.
	 * @param WC_Order $order Order being recovered.
	 */
	return (string) apply_filters( 'woocommerce_abandoned_cart_recovery_url', $this->object->get_checkout_payment_url(), $this->object );
}