Created
June 25, 2023 06:53
-
-
Save codersaiful/5564b9a3018cdb42a7b7ac2d9cf6b050 to your computer and use it in GitHub Desktop.
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 | |
add_filter('wpt_table_row_attr', function($attr, $row_object){ | |
$product_id = $row_object->product_id; | |
$color = get_post_meta($product_id, '_wpt_bg_color', true); | |
// if( empty( $color ) ) return; | |
// $color = '#aabbcc'; | |
// return "data-color='$color_code'"; | |
return "style='background-color:$color;'"; | |
},10, 2); | |
add_action('wp_head',function(){ | |
?> | |
<style> | |
div.wpt-wrap table.wpt_product_table tbody tr.wpt_row>td { | |
background-color: transparent !important; | |
} | |
</style> | |
<?php | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment