Advertisement
wpgenie

Email auction won with additional content

Mar 24th, 2024 (edited)
593
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.47 KB | None | 0 0
  1. <?php
  2. /**
  3.  * Email auction won with additional content
  4.  *
  5.  * Email template should go to /themes/child-theme/woocommerce/emails/auction_win.php folder. This paste is obsolete since default installation of plugin allready contains this same template.
  6.  *
  7.  */
  8. if (!defined('ABSPATH')) exit ; // Exit if accessed directly
  9.  
  10. $product_data = wc_get_product($product_id);
  11. ?>
  12. <?php do_action( 'woocommerce_email_header', $email_heading, $email ); ?>
  13. <?php if( ( $product_data->get_auction_type() == 'reverse' ) && ( get_option('simple_auctions_remove_pay_reverse') == 'yes')  ) { ?>
  14.     <p><?php printf( wp_kses_post( __( "Congratulations. You have won the auction for <a href='%s'>%s</a>. Your bid was: %s.", 'wc_simple_auctions' ) ), get_permalink( $product_id ), $product_data -> get_title(), wc_price( $current_bid ) ); ?></p>
  15. <?php } else { ?>
  16.     <p><?php printf( wp_kses_post( __( "Congratulations. You have won the auction for <a href='%s'>%s</a>. Your bid was: %s. Please click on this link to pay for your auction %s ", 'wc_simple_auctions' ) ), get_permalink( $product_id  ), $product_data -> get_title(), wc_price( $current_bid ), '<a href="' . esc_attr( add_query_arg( "pay-auction",$product_id, $checkout_url ) ). '">' . esc_html__( 'payment', 'wc_simple_auctions' ) . '</a>' ); ?></p>
  17. <?php } ?>
  18.  
  19. <p>
  20. <?php
  21. if ( $additional_content ) {
  22.     echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) );
  23. }
  24. ?>
  25. </p>
  26.  
  27.  
  28. <?php do_action( 'woocommerce_email_footer', $email ); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement