Automattic\WooCommerce\Admin\Features\OnboardingTasks\Tasks
Purchase::clear_dismissal()
Clear dismissal on onboarding product type changes.
Method of the class: Purchase{}
No Hooks.
Return
null
. Nothing (null).
Usage
$Purchase = new Purchase(); $Purchase->clear_dismissal( $old_value, $new_value );
- $old_value(array) (required)
- Old value.
- $new_value(array) (required)
- New value.
Purchase::clear_dismissal() Purchase::clear dismissal code WC 9.2.3
public function clear_dismissal( $old_value, $new_value ) { $product_types = isset( $new_value['product_types'] ) ? (array) $new_value['product_types'] : array(); $previous_product_types = isset( $old_value['product_types'] ) ? (array) $old_value['product_types'] : array(); if ( empty( array_diff( $product_types, $previous_product_types ) ) ) { return; } $this->undo_dismiss(); }