Automattic\WooCommerce\Internal\ProductDownloads\ApprovedDirectories
Register::enable_by_id
Enable the approved directory identitied by the supplied ID.
Method of the class: Register{}
No Hooks.
Returns
true|false.
Usage
$Register = new Register(); $Register->enable_by_id( $id ): bool;
- $id(int) (required)
- The ID of the rule to be deleted.
Register::enable_by_id() Register::enable by id code WC 10.3.3
public function enable_by_id( int $id ): bool {
global $wpdb;
$table = $this->get_table();
return (bool) $wpdb->update( $table, array( 'enabled' => 1 ), array( 'url_id' => $id ) );
}