Inventory_Presser_Plugin::mark_vehicles_for_sale_during_insertion( int $post_ID, WP_Post $post, bool $update )
Fires once a vehicle post has been saved.
Contents
Parameters Parameters
- $post_ID
-
(int) (Required) Post ID.
- $post
-
(WP_Post) (Required) Post object.
- $update
-
(bool) (Required) Whether this is an existing post being updated.
Source Source
File: inventory-presser.php
/** * Fires once a vehicle post has been saved. * * @param int $post_ID Post ID. * @param WP_Post $post Post object. * @param bool $update Whether this is an existing post being updated. */ public function mark_vehicles_for_sale_during_insertion( $post_ID, $post, $update ) { if ( $update ) { // Abort, we only want to affect insertions. return; } // Does the vehicle already have a term in the Availabilities taxonomy? $terms = wp_get_object_terms( $post_ID, 'availability' );
Expand full source code Collapse full source code View on Github