This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function show_content_after_add_to_cart() { | |
echo "<h1>Hello World</h1>"; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function show_content_after_add_to_cart() { | |
echo "<img src='safe_checkout.png' >"; //add image URL in the src attribute | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function show_content_after_add_to_cart() { | |
global $post; | |
$product_id = $post->ID; | |
$categories = get_the_terms( $product_id, 'product_cat' ); | |
if( empty( $categories ) ) { | |
return; | |
} | |
foreach( $categories as $cat ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function add_after_add_to_cart() { | |
global $post; | |
$product_id = $post->ID; | |
$categories = get_the_terms( $product_id, 'product_cat' ); | |
if( empty( $categories ) ) { | |
return; | |
} | |
foreach( $categories as $cat ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function show_content_after_add_to_cart() { | |
global $post; | |
$product_id = $post->ID; | |
$categories = get_the_terms( $product_id, 'product_cat' ); | |
if( empty( $categories ) ) { | |
return; | |
} | |
foreach( $categories as $cat ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function show_content_after_add_to_cart() { | |
global $post; | |
$product_id = $post->ID; | |
$selected_ids = array( 643, 780, 767 ); | |
foreach( $selected_ids as $id ) { | |
if( $product_id == $id ) { | |
echo "<img src='safe_checkout.png' >"; //add image URL in src attribute | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function show_content_after_add_to_cart() { | |
global $post; | |
$product_id = $post->ID; | |
$tags = get_the_terms( $product_id, 'product_tag' ); | |
if( empty( $tags ) ) { | |
return; | |
} | |
foreach( $tags as $tag ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div> | |
<img src='wp-content/uploads/2017/09/safe_checkout1.png' > | |
<img src='wp-content/uploads/2017/09/payment-secure-ssl.jpg' width="100" height="100"> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function include_files() { | |
include_once('after-add-cart-html.html'); | |
} | |
function show_content_after_add_to_cart() { | |
global $post; | |
$product_id = $post->ID; | |
$tags = get_the_terms( $product_id, 'product_tag' ); | |
if( empty( $tags ) ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action( 'woocommerce_after_add_to_cart_form', 'show_content_after_add_to_cart' ); | |
function show_content_after_add_to_cart() { | |
echo "<div> <img src='safe_checkout.png'> </div>"; | |
} |