• Resolved Matt

    (@visibledeals)


    hi,

    I have the below code in my function.php file. It displays “Charges on your statement will appear as XYZ.com” in the order emails. This code worked fine prior to installing AST and appeared in red color. However, in AST the email templete changes the color to the default color. I dont want AST to change this red color. I am ok with the blue overall but need the below code to still appear in red.

    add_action( 'woocommerce_email_before_order_table', 'bbloomer_add_content_specific_email', 20, 4 );
      
    function bbloomer_add_content_specific_email( $order, $sent_to_admin, $plain_text, $email ) {
       if ( $email->id == 'customer_processing_order' or 'customer_completed_order' ) {
          echo '<h2 class="email-upsell-title"><span style="color: rgb(255, 0, 0);">Charges on your statement will appear as &quot;<strong>XYZ.com</strong>&quot;</span></h2><p class="email-upsell-p"></p>';
       }
    }

    how do i stop it from changing the color on above code?

    thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author gaurav1092

    (@gaurav1092)

    Hi @visibledeals,

    Please update code with the below code and let me know how it works.

    add_action( 'woocommerce_email_before_order_table', 'bbloomer_add_content_specific_email', 20, 4 );
      
    function bbloomer_add_content_specific_email( $order, $sent_to_admin, $plain_text, $email ) {
       if ( $email->id == 'customer_processing_order' or 'customer_completed_order' ) {
          echo '<h2 class="email-upsell-title"><span style="color: #ff0000 !important;">Charges on your statement will appear as &quot;<strong>XYZ.com</strong>&quot;</span></h2><p class="email-upsell-p"></p>';
       }
    }
    Thread Starter Matt

    (@visibledeals)

    Hi Gaurav,

    that worked. thanks so much for the quick response.

    Plugin Author gaurav1092

    (@gaurav1092)

    Sure, If you like the plugin and our support, please be kind and?review?the plugin.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘AST is changing the color of custom php code’ is closed to new replies.