Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #439713

    I purchase this plugin WooCommerce PDF Vouchers and the backend drag and drop editor for creating PDF resets after i press save or update.
    I have been in touch with support and they are trying to get in touch with you to figure out the issue.
    http://codecanyon.net/item/woocommerce-pdf-vouchers-wordpress-plugin/7392046

    They did suggest this fix but it didn’t work.
    http://wpweb.co.in/documents/faq/woocommerce-pdf-vouchers/#question4

    I am running the latest version of wordpress and enfold. I am using a child theme
    Thanks

    #440267

    Fixed….
    Code has to go at the bottom of the functions page. Not top as i was trying.

    //Create global variable for builder
    global $builder_object;

    //Assign builder object to global variable
    $builder_object = $builder;

    //Add action for remove builder functionality from voucher templates
    add_action( ‘admin_init’, ‘avia_remove_builder_functionality’ );

    function avia_remove_builder_functionality() {

    global $typenow, $pagenow, $builder_object;

    $remove_enfold_builder_cpt = apply_filters( ‘avia_remove_enfold_builder_cpt’, array( ‘woovouchers’, ‘eddvouchers’ ) );

    if( empty( $typenow ) ) {//If typenow is empty

    if ( !empty( $_GET[‘post’] ) ) {// try to pick it up from the query string

    $post = get_post( $_GET[‘post’] );
    $typenow = $post->post_type;
    } elseif( !empty( $_POST[‘post_ID’] ) ) {// try to pick it up from the quick edit AJAX post

    $post = get_post( $_POST[‘post_ID’] );
    $typenow = $post->post_type;
    }
    }

    if( ( $pagenow == ‘post-new.php’ || $pagenow == ‘post.php’ ) && in_array( $typenow, $remove_enfold_builder_cpt ) ) {

    remove_action(‘load-post.php’, array( $builder_object, ‘admin_init’) , 5 );
    remove_action(‘load-post-new.php’, array( $builder_object, ‘admin_init’) , 5 );
    }
    }

    • This reply was modified 9 years, 7 months ago by OneClickTech.
    #440368

    Hi!

    Glad you figured it out and thank you for sharing your solution! Let us know if you have any other questions or issues

    Regards,
    Yigit

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘WooCommerce PDF Vouchers backend NOT working’ is closed to new replies.