This file contains hidden or 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
<?php | |
function wc_removing_customer_details_in_emails($order, $sent_to_admin, $plain_text, $email) { | |
if ($order->has_shipping_method('wc_pickup_store')) { | |
$mailer = WC()->mailer(); | |
remove_action( 'woocommerce_email_customer_details', array( $mailer, 'email_addresses' ), 20, 3 ); | |
} | |
} | |
add_action('woocommerce_email_customer_details', 'wc_removing_customer_details_in_emails', 5, 4); |
This file contains hidden or 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
<?php | |
function modify_contact_form_field_html( $field_html, $field_label, $post_id ) { | |
// Add HTML before the field. | |
$field_html = '<span>Before the field.</span>' . $field_html; | |
// Add HTML after the field. | |
$field_html .= '<span>After the field.</span>'; | |
// Conditionally add based on field label and post id |