[Resolved] GP Elements displayed on the Woocommerce confirmation page

Home Forums Support [Resolved] GP Elements displayed on the Woocommerce confirmation page

Home Forums Support GP Elements displayed on the Woocommerce confirmation page

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1369566
    Zuzana

    Hello,

    I am trying to add the Facebook pixel code on the website using the GP elements. The problem is, however, that I need to add this code only to the Confirmation page, which the Woocommerce is automatically generating after the successful purchase of the product. Since this is Woocommerce generated page, it does not appear in the WP dashboard list of pages and therefore I am not able to select it in the GP elements Display settings. Is there a way how to apply a GP element to the Woocommerce confirmation page, please? The endpoint checkout URL of the page seems to be: objednavka-prijata

    Thank you in advance for your help.
    Zuzana

    #1369608
    David
    Staff
    Customer Support

    Hi there,

    try wrapping this PHP Conditional around the FB Pixel in your Hook element

    <?php if( is_wc_endpoint_url( 'order-received' ) ) {?>
    
     // Add FB Pixel code to order received page 
    
    <?php } ?>
    #1370623
    Zuzana

    Thank you very much David, it worked! 🙂

    #1370627
    David
    Staff
    Customer Support

    Glad to be of help.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.