cartpops_checkout_button_url

This filter allows you to change the checkout URL.

/**
 * Change the checkout button URL.
 *
 * @param string $url The checkout URL. Default is wc_get_checkout_url().
 */
function my_prefix_cartpops_checkout_url( $url ) {
	$url = esc_url( get_permalink( get_page_by_title( 'Some page' ) ) );

	return $url;
}
add_filter( 'cartpops_checkout_button_url', 'my_prefix_cartpops_checkout_url', 10, 1 );

It's time to improve your WooCommerce Cart

CartPops is a WooCommerce Add To Cart Popup, that helps every shop owner improve their user experience, increase conversions & maximize profits.

Was this page helpful?