Automattic\WooCommerce\Admin\Notes
Note::get_action()
Get action by action name on the note.
Method of the class: Note{}
No Hooks.
Return
Object
. the action.
Usage
$Note = new Note(); $Note->get_action( $action_name, $context );
- $action_name(string) (required)
- The action name.
- $context(string)
- What the value is for. Valid values are 'view' and 'edit'.
Default: 'view'
Note::get_action() Note::get action code WC 9.7.1
public function get_action( $action_name, $context = 'view' ) { $actions = $this->get_prop( 'actions', $context ); $matching_action = null; foreach ( $actions as $i => $action ) { if ( $action->name === $action_name ) { $matching_action =& $actions[ $i ]; break; } } return $matching_action; }