芝麻web文件管理V1.00
编辑当前文件:/home/ezdajrnh/public_html/wp-content/plugins/google-listings-and-ads/src/Jobs/DeleteCoupon.php
coupon_syncer->delete( new DeleteCouponEntry( $wc_coupon_id, new GooglePromotion( $google_promotion ), $google_ids ) ); } /** * 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 = [] ) { $coupon_entry = $args[0] ?? null; if ( ! $coupon_entry instanceof DeleteCouponEntry ) { throw JobException::item_not_provided( 'DeleteCouponEntry for the coupon to delete' ); } if ( $this->can_schedule( [ $coupon_entry ] ) ) { $this->action_scheduler->schedule_immediate( $this->get_process_item_hook(), [ [ $coupon_entry->get_wc_coupon_id(), $coupon_entry->get_google_promotion(), $coupon_entry->get_synced_google_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" ); } }