File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -889,6 +889,13 @@ export function* receiveMCSetup( mcSetup ) {
889
889
} ;
890
890
}
891
891
892
+ /**
893
+ * Creates a wp-data action with data payload to be dispatched the received
894
+ * MC product statistics to wp-data store.
895
+ *
896
+ * @param {ProductStatistics } mcProductStatistics The received MC product statistics data.
897
+ * @yield {Object} The wp-data action with data payload.
898
+ */
892
899
export function * receiveMCProductStatistics ( mcProductStatistics ) {
893
900
return {
894
901
type : TYPES . RECEIVE_MC_PRODUCT_STATISTICS ,
Original file line number Diff line number Diff line change @@ -129,6 +129,17 @@ export const getMCSetup = ( state ) => {
129
129
return state . mc_setup ;
130
130
} ;
131
131
132
+ /**
133
+ * @typedef {import('.~/data/actions').ProductStatistics } ProductStatistics
134
+ */
135
+
136
+ /**
137
+ * Get the MC product statistics data.
138
+ *
139
+ * @param {Object } state The current store state will be injected by `wp.data`.
140
+ *
141
+ * @return {ProductStatistics|null } The MC product statistics data. Returns `null` if data have not yet loaded.
142
+ */
132
143
export const getMCProductStatistics = ( state ) => {
133
144
return state . mc_product_statistics ;
134
145
} ;
You can’t perform that action at this time.
0 commit comments