WC_Email_Customer_Abandoned_Cart_Recovery::get_recovery_url
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
Method of the class: WC_Email_Customer_Abandoned_Cart_Recovery{}
Hooks from the method
Returns
string.
Usage
$WC_Email_Customer_Abandoned_Cart_Recovery = new WC_Email_Customer_Abandoned_Cart_Recovery(); $WC_Email_Customer_Abandoned_Cart_Recovery->get_recovery_url();
Changelog
| Since 11.0.0 | Introduced. |
WC_Email_Customer_Abandoned_Cart_Recovery::get_recovery_url() WC Email Customer Abandoned Cart Recovery::get recovery url code 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 );
}