Single_Product_Sync::add_row_action( array $actions, WP_Post $post )
Summary
No summary available.Parameters
- $actions
-
(array) (Required)
- $post
-
(WP_Post) (Required)
Return
(array)
Source
File: src/BigCommerce/Post_Types/Product/Single_Product_Sync.php
public function add_row_action( $actions, $post ) { if ( get_post_type( $post ) !== Product::NAME ) { return $actions; } if ( ! current_user_can( 'edit_post', $post->ID ) ) { return $actions; } $actions[ self::ACTION ] = sprintf( '<a href="%s" class="%s" title="%s">%s</a>', esc_url( $this->get_sync_url( $post ) ), sanitize_html_class( self::ACTION ), esc_attr( __( 'Synchronize the product with the latest data from the BigCommerce API', 'bigcommerce' ) ), __( 'Re-sync', 'bigcommerce' ) ); return $actions; }