|
/ Documentation /Developers/ How to Trigger a Call-to-action only on Woo-commerce order received page?

How to Trigger a Call-to-action only on Woo-commerce order received page?

If you want to trigger a design only on Woo-commerce order received page, you just need to add following code snippet in your theme’s functions.php file.

add_filter( 'cp_pro_target_page_settings', 'cp_is_display_popup', 10, 2 );

function cp_is_display_popup( $display_style, $style_id ) {
   
	// if style is to display on this page ( replace 10304 with your style id ) 
	if( $display_style && 10304 == $style_id ) {
		
		$display_style = false;  
		
		if( function_exists( 'is_wc_endpoint_url' ) ) {
			if( is_wc_endpoint_url( 'order-received' ) ) {
				$display_style = true;
			}
		}
	}	
        return $display_style;
}

Note: Adding above code will disable style to display on all other pages but order received page.

Was this doc helpful?
What went wrong?

We don't respond to the article feedback, we use it to improve our support content.

Need help? Contact Support
On this page

Compare Convert Pro with...

29439
29440
Scroll to Top