get_type() == 'variable_album' ){
wc_get_template( 'single-product/add-to-cart/variable_album.php',
array(),
'',
WAP_PATH . '/templates/'
);
}
}
public function wap_print_downloads_links( $order_id ){
$order = new WC_Order( $order_id );
if( $order->get_status() != 'processing' && $order->get_status() != 'completed' )
return false;
if( !empty( get_post_meta( $order_id, '_order_is_madiable', true) ) ){
global $wap;
wc_get_template( 'checkout/download_album.php',
array( 'download_link' => $wap->wap_get_downloads_link( $order_id ) ),
'',
WAP_PATH . '/templates/'
);
}
}
public function edited_playlist_template(){
global $product;
if( $product ){
// Unhook default templates.
remove_action( 'wp_footer', 'wp_underscore_playlist_templates', 0 );
remove_action( 'admin_footer', 'wp_underscore_playlist_templates', 0 );
// Hook in new templates.
add_action( 'wp_footer', array( $this, 'wp_edited_underscore_playlist_templates' ), 0 );
add_action( 'admin_footer', array( $this, 'wp_edited_underscore_playlist_templates' ), 0 );
}
}
public function wp_edited_underscore_playlist_templates() {
?>