Hi Brandon. I have the same exact request. Did you figure this out? Looks like the only thing keeping it from integrating is the product type (in this case it’s called an “Appointable Product”. If we can get this to work I’ll buy woo Credits. They provided this function to integrate (3 years ago), however, it no longer works. Either that, or it only works with the platinum version. If that’s the case, please let me know and I’ll purchase the Platinum version:
// Compatibility with Woo Credits plugin.
add_action( 'woocommerce_product_options_general_product_data', 'add_custom_general_credit_field' );
function add_custom_general_credit_field() {
global $woocommerce, $post;
$product_id = $post->ID;
$_product = wc_get_product( $product_id );
if ( 'appointment' == $_product->product_type ) {
echo '<div class="options_group">';
woocommerce_wp_text_input(
array(
'id' => '_credits_amount',
'label' => __( 'Credit Required For Download ', 'mwdcp' ),
'placeholder' => '',
'desc_tip' => 'true',
'description' => __( 'The credits for this product to download.', 'mwdcp' ),
'type' => 'text',
)
);
echo '</div>';
}
}
-
This reply was modified 4 years, 8 months ago by Georgia.