芝麻web文件管理V1.00
编辑当前文件:/home/ezdajrnh/public_html/wp-content/plugins/google-listings-and-ads/src/Jobs/UpdateCoupon.php
wc->maybe_get_coupon( $coupon_id ); if ( $coupon instanceof WC_Coupon && $this->coupon_helper->is_sync_ready( $coupon ) ) { $this->coupon_syncer->update( $coupon ); } } } /** * Schedule the job. * * @param array[] $args * * @throws JobException If no coupon is provided as argument. The exception will be logged by ActionScheduler. */ public function schedule( array $args = [] ) { $args = $args[0] ?? null; $coupon_ids = array_filter( $args, 'is_integer' ); if ( empty( $coupon_ids ) ) { throw JobException::item_not_provided( 'WooCommerce Coupon IDs' ); } if ( $this->can_schedule( [ $coupon_ids ] ) ) { $this->action_scheduler->schedule_immediate( $this->get_process_item_hook(), [ $coupon_ids ] ); } } /** * Get the name of an action hook to attach the job's start method to. * * @return StartHook */ public function get_start_hook(): StartHook { return new StartHook( "{$this->get_hook_base_name()}start" ); } }