Thread Starter
sent09
(@sent09)
Hi,
I asked directly to the developer and he confirms it is compatible with “All products for woocommerce subscriptions”.
-
This reply was modified 5 years, 3 months ago by sent09.
Thread Starter
sent09
(@sent09)
Fixed,
the problem was in other function…
function it_redirect_after_delete_post() {
global $post;
if ( $post ) { // <---- This if wasn't here and it returns the error
$post_type = $post->post_type;
if ( 'reservas_lentillas' == $post_type ) {
wp_redirect( get_admin_url() . '/edit.php?post_type=' . $post_type );
}
exit;
}
}
add_action( 'deleted_post', 'it_redirect_after_delete_post' );