Import_Now::list_table_link( array $views = array() )

Summary

Add the sync link to the views above the products list table. While not exactly a view, it’s a reasonable place to inject the status into the UI.


Parameters

$views

(array) (Optional)

Default value: array()


Return

(array)


Source

File: src/BigCommerce/Settings/Import_Now.php

	public function list_table_link( $views = [] ) {
		ob_start();
		$this->render_button(
			sprintf( '<i class="bc-icon icon-bc-sync"></i> %s', __( 'Sync Products', 'bigcommerce' ) ),
			add_query_arg( [ 'post_type' => Product::NAME ], admin_url( 'edit.php' ) )
		);
		$sync_button = ob_get_clean();
		if ( $sync_button ) {
			$views[ 'bc-sync-products' ] = $sync_button;
		}
		return $views;
	}


User Contributed Notes

You must log in before being able to contribute a note or feedback.