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 | |
add_filter( 'get_post_metadata', 'WDFI_get_post_metadata', 50, 10); | |
function WDFI_get_post_metadata($null, $object_id, $meta_key, $single ){ | |
if ( ( is_admin() && ( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX ) ) ) { | |
return $null; | |
} | |
if ( ! empty( $meta_key ) && '_thumbnail_id' !== $meta_key ) { | |
return $null; | |
} | |
$post_type = get_post_type( $object_id ); |
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 Extra Feature | |
* -------------------------- | |
* | |
* Add custom fee to cart automatically | |
* | |
*/ | |
function woo_add_cart_fee() { | |