Add $primary param back to add_action method

See https://github.com/woocommerce/woocommerce-admin/pull/8474/files#r829672400
This commit is contained in:
Chi-Hsuan Huang 2022-03-21 11:32:19 +08:00
parent fdf88c0d94
commit 58422dd008
4 changed files with 6 additions and 1 deletions

View File

@ -299,7 +299,6 @@ class DataStore extends \WC_Data_Store_WP implements \WC_Object_Data_Store_Inter
'%s',
'%s',
'%s',
'%d',
'%s',
'%s',
'%s',

View File

@ -620,6 +620,7 @@ class Note extends \WC_Data {
* @param string $label Action label (presented as button label).
* @param string $url Action URL, if navigation needed. Optional.
* @param string $status Status to transition parent Note to upon click. Defaults to 'actioned'.
* @param boolean $primary Deprecated since version 3.4.0.
* @param string $actioned_text The label to display after the note has been actioned but before it is dismissed in the UI.
*/
public function add_action(
@ -627,6 +628,7 @@ class Note extends \WC_Data {
$label,
$url = '',
$status = self::E_WC_ADMIN_NOTE_ACTIONED,
$primary = false,
$actioned_text = ''
) {
$name = wc_clean( $name );

View File

@ -51,6 +51,7 @@ class InsightFirstProductAndPayment {
__( 'Yes', 'woocommerce-admin' ),
false,
Note::E_WC_ADMIN_NOTE_ACTIONED,
false,
__( 'Thanks for your feedback', 'woocommerce-admin' )
);
@ -59,6 +60,7 @@ class InsightFirstProductAndPayment {
__( 'No', 'woocommerce-admin' ),
false,
Note::E_WC_ADMIN_NOTE_ACTIONED,
false,
__( 'Thanks for your feedback', 'woocommerce-admin' )
);

View File

@ -54,6 +54,7 @@ class InsightFirstSale {
__( 'Yes', 'woocommerce-admin' ),
false,
Note::E_WC_ADMIN_NOTE_ACTIONED,
false,
__( 'Thanks for your feedback', 'woocommerce-admin' )
);
$note->add_action(
@ -61,6 +62,7 @@ class InsightFirstSale {
__( 'No', 'woocommerce-admin' ),
false,
Note::E_WC_ADMIN_NOTE_ACTIONED,
false,
__( 'Thanks for your feedback', 'woocommerce-admin' )
);