render suggestions containers (& unstyled suggestions) in orders list
This commit is contained in:
parent
24bbb9267e
commit
4e42021578
|
@ -47,8 +47,12 @@ class WC_Admin_List_Table_Orders extends WC_Admin_List_Table {
|
|||
*/
|
||||
protected function render_blank_state() {
|
||||
echo '<div class="woocommerce-BlankState">';
|
||||
|
||||
echo '<h2 class="woocommerce-BlankState-message">' . esc_html__( 'When you receive a new order, it will appear here.', 'woocommerce' ) . '</h2>';
|
||||
echo '<a class="woocommerce-BlankState-cta button-primary button" target="_blank" href="https://docs.woocommerce.com/document/managing-orders/?utm_source=blankslate&utm_medium=product&utm_content=ordersdoc&utm_campaign=woocommerceplugin">' . esc_html__( 'Learn more about orders', 'woocommerce' ) . '</a>';
|
||||
|
||||
do_action( 'wc_marketplace_suggestions_orders_empty_state' );
|
||||
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
|
|
|
@ -29,6 +29,7 @@ class WC_Marketplace_Suggestions {
|
|||
|
||||
// Register hooks for rendering suggestions container markup.
|
||||
add_action( 'wc_marketplace_suggestions_products_empty_state', array( __CLASS__, 'render_products_list_empty_state' ) );
|
||||
add_action( 'wc_marketplace_suggestions_orders_empty_state', array( __CLASS__, 'render_orders_list_empty_state' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -87,6 +88,15 @@ class WC_Marketplace_Suggestions {
|
|||
self::render_suggestions_container( 'products-list-empty-footer' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Render suggestions containers in orders list empty state.
|
||||
*/
|
||||
public static function render_orders_list_empty_state() {
|
||||
self::render_suggestions_container( 'orders-list-empty-header' );
|
||||
self::render_suggestions_container( 'orders-list-empty-body' );
|
||||
self::render_suggestions_container( 'orders-list-empty-footer' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Render a suggestions container element, with the specified context.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue