ActionScheduler_wpPostStore::unclaim_action() public WC 1.0
{} It's a method of the class: ActionScheduler_wpPostStore{}
No Hooks.
Return
Null. Nothing.
Usage
$ActionScheduler_wpPostStore = new ActionScheduler_wpPostStore(); $ActionScheduler_wpPostStore->unclaim_action( $action_id );
- $action_id(string) (required)
- -
Code of ActionScheduler_wpPostStore::unclaim_action() ActionScheduler wpPostStore::unclaim action WC 5.0.0
public function unclaim_action( $action_id ) {
/** @var wpdb $wpdb */
global $wpdb;
$sql = "UPDATE {$wpdb->posts} SET post_password = '' WHERE ID = %d AND post_type = %s";
$sql = $wpdb->prepare( $sql, $action_id, self::POST_TYPE );
$result = $wpdb->query( $sql );
if ( $result === false ) {
/* translators: %s: action ID */
throw new RuntimeException( sprintf( __( 'Unable to unlock claim on action %s. Database error.', 'woocommerce' ), $action_id ) );
}
}