I used claude.ai and through hours of not getting it, i finally got some PHP from claude that worked on the single product page! I havnt tried with the checkout/cart yet but I would assume using this as an example and some more troubleshooting I will get those to work. If I do I will update this post.
Add this code element directly below the add to cart element
Claude info below:
You’re welcome! Just to summarize what made it work, for future reference:
The key elements that made everything work correctly were:
Using WC()->payment_gateways(); to ensure proper gateway initialization
Including the ppcp-messages div with the correct data attribute for Pay in 3 messaging
Using the specific woocommerce_paypal_payments_smart_button_wrapper action for digital wallets (this was crucial for the full-width Google Pay)
Having separate containers for each component with proper width styling
Here’s a clean version of the working code for your reference: