PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Monday, July 4, 2022

[FIXED] How add custom text after PayPal express checkout button on product page woocommerce

 July 04, 2022     paypal, php, woocommerce, wordpress     No comments   

Issue

when I add custom text/html to product page I use this code on function.php

add_action('woocommerce_before_add_to_cart_button', 'after_cart_function');
function after_cart_function() {
    echo "my text";
}

the problem is the text show before paypal express checkout button, I like to add after paypal button

I have already try the others hook without success


Solution

If you want it after the PayPal button, you need to use this code:

add_action('woocommerce_after_add_to_cart_button', 'after_cart_function', 1000);
function after_cart_function() {
    echo "my text";
}

Edit: You can use the plugin "Simply Show Hooks" to check where to hook.



Answered By - Cray
Answer Checked By - Willingham (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing