• Resolved storeline

    (@storeline)


    Hi, i have multisite network and the plugin not work on my website. its activate but i cant see the duplicate button…

Viewing 5 replies - 1 through 5 (of 5 total)
  • I had the same problem

    replace the woocommerce active check at the top of the plugin with this code:

    include_once( ABSPATH . ‘wp-admin/includes/plugin.php’ );

    if (is_plugin_active( ‘woocommerce/woocommerce.php’)){

    Thread Starter storeline

    (@storeline)

    thanks bro!!
    but which file i need to change?
    i try to change the wc-duplicate-order.php file but after the change i get white screen of death

    this is what i do

    <?php

    /*
    Plugin Name: WC Duplicate Order
    Plugin URI: https://jamiegill.com
    Description: Adds a duplicate link to Woocommerce on the order actions to duplicate the existing order
    Version: 1.2
    Author: Jamie Gill
    Author URI: https://jamiegill.com
    License: GPLv2 or later
    */

    if ( ! defined( ‘ABSPATH’ ) ) {
    exit; // Exit if accessed directly
    }

    /**
    * Check if WooCommerce is active
    **/
    if ( in_array( ‘woocommerce/woocommerce.php’, apply_filters( ‘active_plugins’, get_option( ‘active_plugins’ ) ) ) ) {

    define( ‘WCO_PLUGIN_DIR’, dirname( __FILE__ ) );

    include_once( ABSPATH . ‘wp-admin/includes/plugin.php’ );

    if (is_plugin_active( ‘woocommerce/woocommerce.php’)){

    // Hooke Duplicate CTA to shop_order post type

    function clone_order_cta($actions, $post){

    if ($post->post_type==’shop_order’) {

    $url = admin_url( ‘edit.php?post_type=shop_order&order_id=’ . $post->ID );

    $copy_link = wp_nonce_url( add_query_arg( array( ‘duplicate’ => ‘init’ ), $url ), ‘edit_order_nonce’ );

    $actions = array_merge( $actions,
    array(
    ‘duplicate’ => sprintf( ‘%2$s‘,
    esc_url( $copy_link ),
    ‘Duplicate’
    )
    )
    );
    }

    return $actions;

    }

    add_filter( ‘post_row_actions’, ‘clone_order_cta’, 10, 2 );

    }

    Plugin Author Jamie Gill

    (@patchgill)

    I think here means replace line 20 with his two lines of snippets.

    The white screen will be due to an unclosed bracket no doubt, alternatively turn on debug in the config file and it will give you some information on your issue.

    Cheers
    J

    Plugin Author Jamie Gill

    (@patchgill)

    I am marking this as resolved for now as the above suggestion will work once implemented correctly.

    I have the same problem.
    I would be very happy if you can specifically write which line code to overwrite in the file

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘not working’ is closed to new replies.