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_email_after_order_table', 'add_trustpilot_afs_tracking', 20, 2 ); | |
function add_trustpilot_afs_tracking( $order, $sent_to_admin ) { | |
if ( ! $sent_to_admin ) { | |
?> | |
<script type="application/json+trustpilot"> | |
{ | |
"recipientEmail": "<?php echo $order->billing_email; ?>", | |
"recipientName": "<?php echo $order->billing_first_name.' '. $order->billing_last_name; ?>", | |
"referenceId": "<?php echo $order->get_order_number(); ?>", | |
"products": [<?php |
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
@mixin centerer($horizontal: true, $vertical: true) { | |
position: absolute; | |
@if ($horizontal and $vertical) { | |
top: 50%; | |
left: 50%; | |
transform: translate(-50%, -50%); | |
} @else if ($horizontal) { | |
left: 50%; | |
transform: translate(-50%, 0); | |
} @else if ($vertical) { |
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
<?php | |
/* | |
Woocommerce additional product identifier fields | |
Add 4 important product identifiers Brand, MPN, UPC, EAN, GTIN to simple and variabel products required for sales channels | |
*/ | |
// Simple Product Hooks | |
// Display Fields | |
add_action( 'woocommerce_product_options_general_product_data', 'wpmr_custom_general_fields' ); |
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
/** | |
* Adding Custom GTIN Meta Field | |
* Save meta data to DB | |
*/ | |
// add GTIN input field | |
add_action('woocommerce_product_options_inventory_product_data','woocom_simple_product_gtin_field', 10, 1 ); | |
function woocom_simple_product_gtin_field(){ | |
global $woocommerce, $post; | |
$product = new WC_Product(get_the_ID()); | |
echo '<div id="gtin_attr" class="options_group">'; |
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
<?php | |
// ImBox Thank you page - Sales Confirmation page | |
add_action( 'woocommerce_thankyou', 'imbox_tracking_cart', 80 ); | |
function imbox_tracking_cart( $order_id ) { | |
$order = new WC_Order( $order_id ); | |
$order_nr = $order->get_order_number(); | |
$order_email = get_user_meta( $order->user_id, 'billing_email', true ); | |
$order_quantity = $order->get_item_count(); | |
$order_total_shipping = $order->get_total_shipping(); |
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
<?php | |
function register_programs_post_type(){ | |
register_post_type('program', array( | |
'labels' => array( | |
'name' => __('Programs','tankbar'), | |
'singular_name' => __('Program','tankbar'), | |
'add_new' => __('Add program','tankbar'), | |
'add_new_item' => __('Add new program', 'tankbar'), |
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
// Edit order items table template defaults | |
function sww_add_wc_order_email_images( $table, $order ) { | |
ob_start(); | |
$template = $plain_text ? 'emails/plain/email-order-items.php' : 'emails/email-order-items.php'; | |
wc_get_template( $template, array( | |
'order' => $order, | |
'items' => $order->get_items(), | |
'show_download_links' => $show_download_links, |
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_filter( 'woocommerce_shop_order_search_fields', 'woocommerce_shop_order_search_order_total' ); | |
function woocommerce_shop_order_search_order_total( $search_fields ) { | |
$search_fields[] = '_order_total'; | |
return $search_fields; | |
} |
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_filter( 'woocommerce_admin_meta_boxes_variations_per_page', 'override_increase_variations_per_page' ); | |
function override_increase_variations_per_page() { | |
return 50; | |
} |
NewerOlder