esc_html__( 'Affiliates for WooCommerce', 'affiliates-for-woocommerce' ),
'plugin_prefix' => 'ddwcaf',
'review_url' => 'https://wordpress.org/support/plugin/affiliates-for-woocommerce/reviews/#new-post',
] );
}
}
/**
* Plugin settings link
*
* @param array $links Links Array.
* @return array $links
*/
public function ddwcaf_plugin_settings_link( $links ) {
ob_start();
?>
|
|
|
'' . esc_html__( 'Support', 'affiliates-for-woocommerce' ) . '',
'documentation' => '' . esc_html__( 'Documentation', 'affiliates-for-woocommerce' ) . '',
'review' => '',
];
$links = array_merge( $links, $row_meta );
}
return $links;
}
}
}
if ( ! class_exists( 'DDWCAF_Init' ) ) {
}
// Load DevDiggers Framework if not loaded already.
add_action( 'plugins_loaded', function() {
if ( ! class_exists( 'DDWCAF_Init' ) ) {
defined( 'DDWCAF_PLUGIN_FILE' ) || define( 'DDWCAF_PLUGIN_FILE', plugin_dir_path( __FILE__ ) );
defined( 'DDWCAF_PLUGIN_URL' ) || define( 'DDWCAF_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
// Load Free version.
DDWCAF_Free_Init::get_instance();
// Load DevDiggers Framework if not loaded already.
if ( ! defined( 'DDFW_LOADED' ) && file_exists( DDWCAF_PLUGIN_FILE . 'devdiggers-framework/init.php' ) ) {
$should_load = true;
if ( ! empty( $_GET['page'] ) ) {
$current_page = $_GET['page'];
$prefix = explode( '-', $current_page )[0];
if ( 0 === strpos( $prefix, 'ddwc' ) || 0 === strpos( $prefix, 'ddwp' ) ) {
$pro_class = strtoupper( $prefix ) . '_Init';
$free_class = strtoupper( $prefix ) . '_Free_Init';
if ( class_exists( $free_class ) && ! class_exists( $pro_class ) && 'ddwcaf' !== $prefix ) {
$should_load = false;
}
}
}
if ( $should_load ) {
require DDWCAF_PLUGIN_FILE . 'devdiggers-framework/init.php';
}
}
}
}, 10 );
// For HPOS Compatibility
add_action( 'before_woocommerce_init', function() {
if ( class_exists( \Automattic\WooCommerce\Utilities\FeaturesUtil::class ) ) {
\Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__, true );
}
} );
require_once plugin_dir_path( __FILE__ ) . 'includes/install.php';
register_activation_hook( __FILE__, [ 'DDWCAF_Install', 'ddwcaf_on_plugin_activation' ] );